From 4daabb9d712b63278b3b2211bc28aec07bc4485d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenzo=20Tilve=20=C3=81lvaro?= Date: Tue, 3 Jul 2012 12:07:35 +0200 Subject: [PATCH] i18n: Fixing strings * Correct some wrong strings * Remove unneeded strings marked to be translated FEA: ItEr76S04BugFixing --- .../costcategories/entities/HourCost.java | 2 +- .../business/orders/entities/OrderElement.java | 2 +- .../business/planner/entities/Task.java | 2 +- .../workreports/entities/WorkReportType.java | 6 +++--- .../BaseCalendarEditionController.java | 2 +- .../web/common/ConfigurationModel.java | 2 +- ...skQualityFormsToOrderElementController.java | 2 +- ...nedTaskQualityFormsToOrderElementModel.java | 2 +- .../ManageOrderElementAdvancesController.java | 18 +++++++++--------- .../web/orders/OrderElementTreeController.java | 2 +- .../web/planner/allocation/FormBinder.java | 3 +-- .../QualityFormCRUDController.java | 2 +- .../resources/criterion/CriterionsModel.java | 4 ++-- .../AssignedMachineCriterionsModel.java | 2 +- .../libreplan/web/scenarios/ScenarioModel.java | 6 +++--- .../workreports/WorkReportCRUDController.java | 4 ++-- .../src/main/webapp/common/layout/template.zul | 2 +- .../webapp/orders/_listOrderElementHours.zul | 4 ++-- .../taskpanels/_tabPanelSubcontract.zul | 2 +- .../typeofworkhours/_editTypeOfWorkHours.zul | 2 +- 20 files changed, 35 insertions(+), 36 deletions(-) diff --git a/libreplan-business/src/main/java/org/libreplan/business/costcategories/entities/HourCost.java b/libreplan-business/src/main/java/org/libreplan/business/costcategories/entities/HourCost.java index 754783c3f..0b9c44e33 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/costcategories/entities/HourCost.java +++ b/libreplan-business/src/main/java/org/libreplan/business/costcategories/entities/HourCost.java @@ -93,7 +93,7 @@ public class HourCost extends IntegrationEntity { this.priceCost = priceCost; } - @NotNull(message = "init date not specified") + @NotNull(message = "start date not specified") public LocalDate getInitDate() { return initDate; } diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java index d355da7c7..c048dd48e 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java @@ -1429,7 +1429,7 @@ public abstract class OrderElement extends IntegrationEntity implements return getOrder() != null ? getOrder().isCodeAutogenerated() : false; } - @AssertTrue(message = "a quality form can not be assigned twice to the same order element") + @AssertTrue(message = "a quality form cannot be assigned twice to the same order element") public boolean checkConstraintUniqueQualityForm() { Set qualityForms = new HashSet(); for (TaskQualityForm each : taskQualityForms) { diff --git a/libreplan-business/src/main/java/org/libreplan/business/planner/entities/Task.java b/libreplan-business/src/main/java/org/libreplan/business/planner/entities/Task.java index a2ee164c5..b3231dfcd 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/planner/entities/Task.java +++ b/libreplan-business/src/main/java/org/libreplan/business/planner/entities/Task.java @@ -168,7 +168,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained { } @SuppressWarnings("unused") - @AssertTrue(message = "order element associated to a task must be not null") + @AssertTrue(message = "order element associated to a task must be not empty") private boolean theOrderElementMustBeNotNull() { return getOrderElement() != null; } diff --git a/libreplan-business/src/main/java/org/libreplan/business/workreports/entities/WorkReportType.java b/libreplan-business/src/main/java/org/libreplan/business/workreports/entities/WorkReportType.java index 7c3e9c03c..5795ec323 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/workreports/entities/WorkReportType.java +++ b/libreplan-business/src/main/java/org/libreplan/business/workreports/entities/WorkReportType.java @@ -164,7 +164,7 @@ public class WorkReportType extends IntegrationEntity implements IHumanIdentifia } @SuppressWarnings("unused") - @AssertTrue(message = "timeshet template name is already being used") + @AssertTrue(message = "timesheet template name is already being used") public boolean checkConstraintUniqueWorkReportTypeName() { IWorkReportTypeDAO workReportTypeDAO = Registry.getWorkReportTypeDAO(); if (isNewObject()) { @@ -418,13 +418,13 @@ public class WorkReportType extends IntegrationEntity implements IHumanIdentifia } @SuppressWarnings("unused") - @AssertTrue(message = "In Heading the index labels and fields must be unique and consecutive.") + @AssertTrue(message = "In the heading part, index labels and fields must be unique and consecutive") public boolean checkConstraintTheIndexHeadingFieldsAndLabelMustBeUniqueAndConsecutive() { return validateTheIndexFieldsAndLabels(getHeadingFieldsAndLabels()); } @SuppressWarnings("unused") - @AssertTrue(message = "In Lines the index labels and fields must be unique and consecutive.") + @AssertTrue(message = "In the lines part, index labels and fields must be unique and consecutive") public boolean checkConstraintTheIndexLineFieldsAndLabelMustBeUniqueAndConsecutive() { return validateTheIndexFieldsAndLabels(getLineFieldsAndLabels()); } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/calendars/BaseCalendarEditionController.java b/libreplan-webapp/src/main/java/org/libreplan/web/calendars/BaseCalendarEditionController.java index 84754e94e..d4fb4f71e 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/calendars/BaseCalendarEditionController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/calendars/BaseCalendarEditionController.java @@ -1519,7 +1519,7 @@ public abstract class BaseCalendarEditionController extends if (code != null && !code.isDisabled() && code.getValue().isEmpty()) { throw new WrongValueException(code, - _("It can not be empty")); + _("It cannot be empty")); } } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationModel.java index fe157da77..1e819dae3 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationModel.java @@ -183,7 +183,7 @@ public class ConfigurationModel implements IConfigurationModel { } if (!checkConstraintPrefixNotRepeated(sequences)) { throw new ValidationException(_( - "The {0} sequence prefixes can not be repeated", + "The {0} sequence prefixes cannot be repeated", entityName.getDescription())); } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementController.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementController.java index 2477514f9..38cf1c540 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementController.java @@ -385,7 +385,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends columns.appendChild(columnPercentage); Column columnPassed = new Column(); - columnPassed.setLabel(_("Passed")); + columnPassed.setLabel(_("Checked")); columns.appendChild(columnPassed); Column columnDate = new Column(); diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementModel.java index cd5bf12f6..3598500b5 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/AssignedTaskQualityFormsToOrderElementModel.java @@ -339,7 +339,7 @@ public class AssignedTaskQualityFormsToOrderElementModel implements private void showMessageDeleteSpread() throws ValidationException { throw new ValidationException( - _("The operation does not perform because the task has progress reports that is spread associated with this quality form")); + _("Quality form cannot be removed as it is spreading progress")); } @Override diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/ManageOrderElementAdvancesController.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/ManageOrderElementAdvancesController.java index 2e4fb4c04..0320c545a 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/ManageOrderElementAdvancesController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/ManageOrderElementAdvancesController.java @@ -126,7 +126,7 @@ public class ManageOrderElementAdvancesController extends throw new InvalidValueException(_("values are not valid, the values must not be null")); } if (!validateReportGlobalAdvance()) { - throw new InvalidValueException(_("spread values are not valid, one progress must be checked as spread")); + throw new InvalidValueException(_("spread values are not valid, at least one value should be true")); } } @@ -139,7 +139,7 @@ public class ManageOrderElementAdvancesController extends messagesForUser.showMessage(Level.ERROR, _("Cannot create another progress of the same type")); } catch (DuplicateValueTrueReportGlobalAdvanceException e) { messagesForUser.showMessage( - Level.ERROR, _("spread values are not valid, one progress must be checked as spread")); + Level.ERROR, _("spread values are not valid, at least one value should be true")); } catch (InvalidValueException e) { messagesForUser.showMessage(Level.ERROR, e.getMessage()); } catch (InstanceNotFoundException e) { @@ -738,11 +738,11 @@ public class ManageOrderElementAdvancesController extends && (advance.getAdvanceType().isQualityForm())) { removeButton.setDisabled(true); removeButton - .setTooltiptext(_("Progress that are reported by quality forms can not be modified")); + .setTooltiptext(_("Progress that are reported by quality forms cannot be modified")); } else if (advance instanceof IndirectAdvanceAssignment) { removeButton.setDisabled(true); removeButton - .setTooltiptext(_("Calculated progress can not be removed")); + .setTooltiptext(_("Calculated progress cannot be removed")); } else if (manageOrderElementAdvancesModel .hasConsolidatedAdvances(advance)) { removeButton.setDisabled(true); @@ -751,11 +751,11 @@ public class ManageOrderElementAdvancesController extends } else if (readOnly) { removeButton.setDisabled(true); removeButton - .setTooltiptext(_("Subcontractor values are read only because they were reported by the subcontractor company.")); + .setTooltiptext(_("Subcontractor values are read only because they were reported by the subcontractor company")); } else if (manageOrderElementAdvancesModel.hasReportedProgress(advance)) { removeButton.setDisabled(true); removeButton - .setTooltiptext(_("Progress assignment can not be removed because it has advance measurements already sent to customer.")); + .setTooltiptext(_("Advance assignment cannot be removed as it has advance measures that have already been reported to the customer")); } hbox.appendChild(removeButton); @@ -1316,7 +1316,7 @@ public class ManageOrderElementAdvancesController extends private String validateValueAdvanceMeasurement( AdvanceMeasurement measurement) { if (manageOrderElementAdvancesModel.greatThanMaxValue(measurement)) { - return _("Value is not valid, the current value must be less than max value"); + return _("Value is not valid. It must be smaller than max value"); } if (!manageOrderElementAdvancesModel.isPrecisionValid(measurement)) { return _( @@ -1357,11 +1357,11 @@ public class ManageOrderElementAdvancesController extends .getAdvanceAssignment()); if (consolidatedUntil != null) { if (consolidatedUntil.compareTo(measurement.getDate()) >= 0) { - return _("Date is not valid, it must be greater than the last progress consolidation"); + return _("Date is not valid, it must be later than the last progress consolidation"); } } if (manageOrderElementAdvancesModel.isAlreadyReportedProgressWith(value)) { - return _("Date is not valid, it must be greater than the last progress reported to the customer"); + return _("Date is not valid, it must be later than the last progress reported to the customer"); } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderElementTreeController.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderElementTreeController.java index 9c5f47db5..c0f1f63f3 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderElementTreeController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderElementTreeController.java @@ -715,7 +715,7 @@ public class OrderElementTreeController extends TreeController { messagesForUser .showMessage( Level.ERROR, - _("You can not remove the task \"{0}\" because it has work reported on it or any of its children", + _("You cannot remove the task \"{0}\" because it has work reported on it or any of its children", element.getName())); } else { super.remove(element); diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/planner/allocation/FormBinder.java b/libreplan-webapp/src/main/java/org/libreplan/web/planner/allocation/FormBinder.java index d81b2bcca..b8115893e 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/planner/allocation/FormBinder.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/planner/allocation/FormBinder.java @@ -337,8 +337,7 @@ public class FormBinder { .equals(specifiedWorkableDays)) { Clients.response(new AuWrongValue( taskWorkableDays, - _("The original workable days value {0}, " - + "is prevented because consolidated values cannot be modified", + _("The original workable days value {0} cannot be modified as it has consolidations", specifiedWorkableDays))); taskWorkableDays .setValue(effectiveWorkableDays); diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/qualityforms/QualityFormCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/qualityforms/QualityFormCRUDController.java index f3729561e..f3f439ac3 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/qualityforms/QualityFormCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/qualityforms/QualityFormCRUDController.java @@ -158,7 +158,7 @@ public class QualityFormCRUDController extends BaseCRUDController { try { if (Messagebox .show( - _("Deleting this item, it will disable the report progress option. Are you sure?"), + _("Deleting this item will disable the report progress option. Are you sure?"), _("Confirm"), Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION) == Messagebox.OK) { diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/resources/criterion/CriterionsModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/resources/criterion/CriterionsModel.java index cdfefef43..c73c0bb3f 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/resources/criterion/CriterionsModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/resources/criterion/CriterionsModel.java @@ -213,8 +213,8 @@ public class CriterionsModel extends IntegrationEntityModel implements ICriterio private List getResourcesSatisfying( Class resourceType, Criterion criterion) { - Validate.notNull(resourceType, _("ResourceType must be not-null")); - Validate.notNull(criterion, _("Criterion must be not-null")); + Validate.notNull(resourceType, _("Resource type cannot be empty")); + Validate.notNull(criterion, _("Criterion cannot be empty")); List result = new ArrayList(); for (T r : resourceDAO.list(resourceType)) { if (criterion.isSatisfiedBy(r)) { diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/AssignedMachineCriterionsModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/AssignedMachineCriterionsModel.java index 6f0fa3d16..4a91d26f4 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/AssignedMachineCriterionsModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/AssignedMachineCriterionsModel.java @@ -415,7 +415,7 @@ public class AssignedMachineCriterionsModel extends IntegrationEntityModel throw new IllegalStateException(_("The {0} can not be assigned to this resource. Its interval overlaps with other criterion", criterion.getName())); } if (checkNotAllowSimultaneousCriterionsPerResource(satisfactionDTO)) { - throw new IllegalStateException(_("The {0} is not valid, criterionType overlaps with other criterionSatisfaction from the same criterionType", criterion.getName())); + throw new IllegalStateException(_("The {0} is not valid. Other value exists from the same criterion type", criterion.getName())); } } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/scenarios/ScenarioModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/scenarios/ScenarioModel.java index e1603b326..40454bc9c 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/scenarios/ScenarioModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/scenarios/ScenarioModel.java @@ -115,7 +115,7 @@ public class ScenarioModel implements IScenarioModel { boolean isMainScenario = PredefinedScenarios.MASTER.getScenario().getId().equals(scenario.getId()); if (isMainScenario) { throw new IllegalArgumentException( - _("You can not remove the default scenario \"{0}\"", PredefinedScenarios.MASTER.getName())); + _("You cannot remove the default scenario \"{0}\"", PredefinedScenarios.MASTER.getName())); } Scenario currentScenario = scenarioManager.getCurrent(); @@ -123,13 +123,13 @@ public class ScenarioModel implements IScenarioModel { scenario.getId()); if (isCurrentScenario) { throw new IllegalArgumentException( - _("You can not remove the current scenario")); + _("You cannot remove the current scenario")); } List derivedScenarios = getDerivedScenarios(scenario); if (!derivedScenarios.isEmpty()) { throw new IllegalArgumentException( - _("You can not remove a scenario with derived scenarios")); + _("You cannot remove a scenario with derived scenarios")); } List users = userDAO.findByLastConnectedScenario(scenario); diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/workreports/WorkReportCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/workreports/WorkReportCRUDController.java index 37649e704..b26f0a508 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/workreports/WorkReportCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/workreports/WorkReportCRUDController.java @@ -797,11 +797,11 @@ public class WorkReportCRUDController extends GenericForwardComposer implements if (!getWorkReport().getWorkReportType().getHoursManagement() .equals(HoursManagementEnum.NUMBER_OF_HOURS)) { NewDataSortableColumn columnHourStart = new NewDataSortableColumn(); - columnHourStart.setLabel(_("Hour start")); + columnHourStart.setLabel(_("Start hour")); columnHourStart.setSclass("column-hour-start"); columns.appendChild(columnHourStart); NewDataSortableColumn columnHourFinish = new NewDataSortableColumn(); - columnHourFinish.setLabel(_("Hour finish")); + columnHourFinish.setLabel(_("Finish Hour")); columnHourStart.setSclass("column-hour-finish"); columns.appendChild(columnHourFinish); } diff --git a/libreplan-webapp/src/main/webapp/common/layout/template.zul b/libreplan-webapp/src/main/webapp/common/layout/template.zul index 34bef5d2c..b87865311 100644 --- a/libreplan-webapp/src/main/webapp/common/layout/template.zul +++ b/libreplan-webapp/src/main/webapp/common/layout/template.zul @@ -168,7 +168,7 @@ signature="java.lang.Boolean isDefaultPasswordsControl()"?> id="warningDefaultPasswdReports" style="display:${templateCtrl.defaultPasswdReportsVisible}">[reports] - ${i18n:_('default password were not changed')}. + ${i18n:_('default password was not changed')}. diff --git a/libreplan-webapp/src/main/webapp/orders/_listOrderElementHours.zul b/libreplan-webapp/src/main/webapp/orders/_listOrderElementHours.zul index b597f1853..07b2a3572 100644 --- a/libreplan-webapp/src/main/webapp/orders/_listOrderElementHours.zul +++ b/libreplan-webapp/src/main/webapp/orders/_listOrderElementHours.zul @@ -226,14 +226,14 @@ - -