Moti Asayag has posted comments on this change.

Change subject: <core|userportal|webadmin>: added singular variant for messages.
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.ovirt.org/#/c/25736/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/RemoveProviderCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/RemoveProviderCommand.java:

Line 113:         }
Line 114: 
Line 115:         public VdcBllMessages 
providerNetworkUsedValidationMessage(int numberOfNetworks) {
Line 116:             boolean singular = numberOfNetworks == 1;
Line 117:             return singular ? 
VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE : 
VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_MULTIPLE_TIMES;
a matter of choice - you could inline the condition:

 return numberOfNetworks == 1 ? 
VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE
 : VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_MULTIPLE_TIMES;
Line 118:         }
Line 119: 
Line 120:         protected NetworkDao getNetworkDao() {
Line 121:             return DbFacade.getInstance().getNetworkDao();


http://gerrit.ovirt.org/#/c/25736/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VnicProfileValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VnicProfileValidator.java:

Line 99:     }
Line 100: 
Line 101:     private VdcBllMessages vNicProfileInUseValidationMessage(int 
numberOfEntities) {
Line 102:         boolean singular = numberOfEntities == 1;
Line 103:         return singular ? 
VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_ONE_USE : 
VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_MANY_USES;
did you use the formatter for this line ?  it seems longer than 120 characters.
Line 104:     }
Line 105: 
Line 106:     public ValidationResult portMirroringNotChangedIfUsedByVms() {
Line 107:         if (vnicProfile.isPortMirroring() == 
getOldVnicProfile().isPortMirroring()) {


http://gerrit.ovirt.org/#/c/25736/1/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/provider/RemoveProviderValidatorTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/provider/RemoveProviderValidatorTest.java:

Line 98: 
Line 99:         networksUsedTest(net,
Line 100:                 false,
Line 101:                 true,
Line 102:                 
both(failsWith(VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE))
would you like to add a test for the plural form ?
Line 103:                 
.and(replacements(hasItem(containsString(net.getName())))));
Line 104:     }
Line 105: 
Line 106:     @Test


http://gerrit.ovirt.org/#/c/25736/1/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties:

Line 422: NETWORK_NAME_ALREADY_EXISTS=Cannot ${action} ${type}. Network name 
already exists.
Line 423: ACTION_TYPE_FAILED_VNIC_PROFILE_NOT_EXISTS=Cannot ${action} ${type}. 
The specified VM network interface profile doesn't exist.
Line 424: ACTION_TYPE_FAILED_VNIC_PROFILE_NAME_IN_USE=Cannot ${action} ${type}. 
The VM network interface profile's name is already used by an existing profile 
for the same network.\n-Please choose a different name.
Line 425: ACTION_TYPE_FAILED_VNIC_PROFILE_IN_ONE_USE=Cannot ${action} ${type}. 
Several ${entities} (${ENTITIES_USING_VNIC_PROFILE_COUNTER}) are using this VM 
network interface profile:\n${ENTITIES_USING_VNIC_PROFILE}\n - Please remove it 
from all ${entities} that are using it and try again.
Line 426: ACTION_TYPE_FAILED_VNIC_PROFILE_IN_MANY_USES=Cannot ${action} 
${type}. Several ${entities} (${ENTITIES_USING_VNIC_PROFILE_COUNTER}) are using 
this VM network interface profile:\n${ENTITIES_USING_VNIC_PROFILE}\n - Please 
remove it from all ${entities} that are using it and try again.
The plural and the singular messages contain the same text. Shouldn't the 
singular and plural form contain the text as suggested on:

https://bugzilla.redhat.com/show_bug.cgi?id=997197#c2
Line 427: ACTION_TYPE_FAILED_CANNOT_CHANGE_VNIC_PROFILE_NETWORK=Cannot 
${action} ${type}. VM network interface profile's network cannot be changed.
Line 428: ACTION_TYPE_FAILED_CANNOT_ADD_VNIC_PROFILE_TO_NON_VM_NETWORK=Cannot 
${action} ${type}. VM network interface profiles cannot be added to a non-VM 
network. Please make sure the network is a VM network.
Line 429: ACTION_TYPE_FAILED_CANNOT_FIND_VNIC_PROFILE_FOR_NETWORK=Cannot 
${action} ${type}. There is no VM network interface profile for the network the 
user can use.\n- Please use a VM network interface profile instead of a network 
name.
Line 430: ACTION_TYPE_FAILED_NAME_ALREADY_USED=Cannot ${action} ${type}. The 
${type} name is already in use, please choose a unique name and try again.


http://gerrit.ovirt.org/#/c/25736/1/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors_de_DE.properties
File 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors_de_DE.properties:

Line 485: # translation auto-copied from project oVirt, version master, 
document 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors,
 author rgromans
Line 486: NETWORK_MTU_OVERRIDE_NOT_SUPPORTED=Kann nicht ${action} ${type}. Das 
au\u00DFer Kraft setzen der MTU ist f\u00FCr diese 
Data-Center-Kompatibilit\u00E4tsversion nicht unterst\u00FCtzt.
Line 487: ACTION_TYPE_FAILED_MIGRATION_NETWORK_IS_NOT_SUPPORTED=Kann ${type} 
nicht ${action} . Migrationsnetzwerk wird f\u00FCr diese Clusterversion nicht 
unterst\u00FCtzt.
Line 488: ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST=Kann nicht ${action} 
${type}. Der Provider ist im System nicht vorhanden.
Line 489: ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_MULTIPLE_TIMES=Kann nicht 
${action} ${type}. Mehrere externe Netzwerke (${NETWORK_NAMES_COUNTER}) werden 
von virtuellen Maschinen und/oder Vorlagen verwendet\:\n${NETWORK_NAMES}\n - 
Bitte l\u00F6sen Sie diesen externen Netzwerkgebrauch zuerst auf und versuchen 
Sie es dann erneut.
the translated files are out of our control and managed only by zanata. Please 
modify only the following files:
 backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
Line 490: ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE=
Line 491: ACTION_TYPE_FAILED_EXTERNAL_NETWORK_ALREADY_EXISTS=Kann nicht 
${action} ${type}. Das externe Netzwerk ist im Data-Center bereits vorhanden 
als '${NetworkName}'.
Line 492: ACTION_TYPE_FAILED_EXTERNAL_NETWORK_MUST_BE_VM_NETWORK=Kann nicht 
${action} ${type}. Ein externes Netzwerk kann kein nicht-VM Netzwerk sein.
Line 493: ACTION_TYPE_FAILED_EXTERNAL_NETWORK_DETAILS_CANNOT_BE_EDITED=Kann 
nicht ${action} ${type}. Externe Netzwerk-Details (ausgenommen Name und 
Beschreibung) k\u00F6nnen nicht ge\u00E4ndert werden.


-- 
To view, visit http://gerrit.ovirt.org/25736
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2410b2c75380a78ffc24d142987e684182bf5dc9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to