i18n: Fixing strings

* Correct some wrong strings
* Remove unneeded strings marked to be translated

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-06-29 17:32:40 +02:00
parent f1c21413f6
commit 1a9deaa2e7
89 changed files with 214 additions and 246 deletions

View file

@ -2014,7 +2014,7 @@ following validation on ``_editStretchesFunctionTemplate.zul`` file::
value="@{controller.stretchesFunctionTemplate.name}"
width="300px"
onBlur="controller.updateWindowTitle()"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
Now, if users set an empty name, they will receive an error in a pop-up. However,
if they click *Save* button, the request to sever will be sent and then they

View file

@ -106,7 +106,7 @@ public class CostCategory extends IntegrationEntity implements IHumanIdentifiabl
// this is not exactly an overlapping but a
// problem with missing compulsory fields
throw ValidationException.invalidValue(
_("Hours cost type cannot be empty or null"),
"Hours cost type cannot be empty",
listElement);
}
if (listElement.getType().getId()
@ -115,12 +115,12 @@ public class CostCategory extends IntegrationEntity implements IHumanIdentifiabl
// this is not exactly an overlapping but a
// problem with missing compulsory fields
throw ValidationException.invalidValue(
_("Init date cannot be empty or null"),
"Init date cannot be empty",
listElement);
}
if (endDate == null && listElement.getEndDate() == null) {
throw ValidationException.invalidValue(
_("End date cannot be empty or null"),
"End date cannot be empty",
listElement);
} else if ((endDate == null && listElement.getEndDate()
.compareTo(initDate) >= 0)
@ -340,4 +340,4 @@ public class CostCategory extends IntegrationEntity implements IHumanIdentifiabl
return true;
}
}
}
}

View file

@ -142,7 +142,7 @@ public class ResourcesCostCategoryAssignment extends IntegrationEntity {
}
}
@AssertTrue(message="cost assignment with end date less than start date")
@AssertTrue(message="cost assignment with end date before start date")
public boolean checkConstraintPositiveTimeInterval() {
/* Check if it makes sense to check the constraint .*/

View file

@ -82,7 +82,7 @@ public class UnitType extends IntegrationEntity implements IHumanIdentifiable {
this.measure = measure;
}
@AssertTrue(message = "the measure unit type has to be unique. It is already used")
@AssertTrue(message = "the measure has to be unique")
public boolean checkConstraintUniqueName() {
if (StringUtils.isBlank(measure)) {
return true;

View file

@ -172,12 +172,12 @@ public abstract class ResourcesPerDayModification extends
@Override
public String getNoValidPeriodsMessage() {
return _("The resource's calendar has no available days starting from the start of the task.");
return _("Resource is not available from task's start");
}
@Override
public String getNoValidPeriodsMessageDueToIntersectionMessage() {
return _("There are no days available at resource's calendar in the days marked available by the task's calendar.");
return _("Resource is not available according to task's calendar");
}
private Resource getAssociatedResource() {

View file

@ -293,8 +293,7 @@ public class CriterionSatisfaction extends IntegrationEntity {
return criterion.getType().getResource();
}
@AssertTrue(message="criterion satisfaction with end date less than start " +
"date")
@AssertTrue(message = "criterion satisfaction with end date before start")
public boolean checkConstraintPositiveTimeInterval() {
/* Check if it makes sense to check the constraint .*/

View file

@ -198,7 +198,7 @@ public class WorkReportLine extends IntegrationEntity implements Comparable,
this.labels = labels;
}
@NotNull(message = "work report not specified")
@NotNull(message = "timesheet not specified")
public WorkReport getWorkReport() {
return workReport;
}
@ -395,7 +395,7 @@ public class WorkReportLine extends IntegrationEntity implements Comparable,
return Registry.getWorkReportLineDAO();
}
@AssertTrue(message = "fields should match with work report data if are shared by lines")
@AssertTrue(message = "fields should match with timesheet data if are shared by lines")
public boolean checkConstraintFieldsMatchWithWorkReportIfAreSharedByLines() {
if (!firstLevelValidationsPassed()) {
return true;
@ -441,7 +441,7 @@ public class WorkReportLine extends IntegrationEntity implements Comparable,
&& (orderElement != null);
}
@AssertTrue(message = "label type:the work report have not assigned this label type")
@AssertTrue(message = "label type: the timesheet has not assigned this label type")
public boolean checkConstraintAssignedLabelTypes() {
if (this.workReport == null
|| this.workReport.getWorkReportType() == null) {
@ -464,7 +464,7 @@ public class WorkReportLine extends IntegrationEntity implements Comparable,
return true;
}
@AssertTrue(message = "description value:the work report have not assigned the description field")
@AssertTrue(message = "description value: the timesheet has not assigned the description field")
public boolean checkConstraintAssignedDescriptionValues() {
if (this.workReport == null
|| this.workReport.getWorkReportType() == null) {
@ -487,7 +487,7 @@ public class WorkReportLine extends IntegrationEntity implements Comparable,
return true;
}
@AssertTrue(message = "There are repeated description values in the work report line")
@AssertTrue(message = "there are repeated description values in the timesheet lines")
public boolean checkConstraintAssignedRepeatedDescriptionValues() {
Set<String> textFields = new HashSet<String>();

View file

@ -77,7 +77,7 @@ public class DescriptionValue implements INewObject {
this.fieldName = fieldName;
}
@NotNull(message = "value cannot be null")
@NotNull(message = "value not specified")
public String getValue() {
return value;
}

View file

@ -416,8 +416,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
messagesForUser
.showMessage(
Level.ERROR,
_("Calendar cannot be removed because it still has children. "
+ "Some other calendar is derived from this one."));
_("Calendar cannot be removed as it has other derived calendars from it"));
return;
}
@ -453,11 +452,8 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
calendar.getName()), _("Delete"), Messagebox.OK
| Messagebox.CANCEL, Messagebox.QUESTION);
} catch (InterruptedException e) {
LOG.error(
_("Error on showing removing element: ", calendar.getId()),
e);
throw new RuntimeException(e);
}
return Messagebox.CANCEL;
}
private boolean isReferencedByOtherEntities(BaseCalendar calendar) {
@ -476,9 +472,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
Messagebox.show(_(message), _("Warning"), Messagebox.OK,
Messagebox.EXCLAMATION);
} catch (InterruptedException e) {
LOG.error(
_("Error on showing warning message removing calendar: ",
calendar.getId()), e);
throw new RuntimeException(e);
}
}

View file

@ -594,7 +594,7 @@ public abstract class BaseCalendarEditionController extends
}
if (calendar.getCapacityOn(PartialDay.wholeDay(date)).isZero()) {
return _("Not working day");
return _("Not workable day");
}
return _("Normal");
@ -628,7 +628,7 @@ public abstract class BaseCalendarEditionController extends
Date endDate = dateboxEndDate.getValue();
if (endDate == null) {
throw new WrongValueException(dateboxEndDate,
_("You should select a end date for the exception"));
_("You should select an end date for the exception"));
} else {
Clients.closeErrorBox(dateboxEndDate);
}
@ -991,7 +991,7 @@ public abstract class BaseCalendarEditionController extends
.getFellow("parentCalendars");
if (parentCalendars.getSelectedItem() == null) {
throw new WrongValueException(parentCalendars,
_("cannot be null or empty"));
_("cannot be empty"));
}
selected = (BaseCalendar) parentCalendars.getSelectedItem()
.getValue();
@ -1181,7 +1181,7 @@ public abstract class BaseCalendarEditionController extends
}
});
code.setConstraint("no empty:" + _("cannot be null or empty"));
code.setConstraint("no empty:" + _("cannot be empty"));
listcell.appendChild(code);
item.appendChild(listcell);
@ -1220,7 +1220,7 @@ public abstract class BaseCalendarEditionController extends
if (!baseCalendarModel.isOwnException(calendarException)) {
result.setDisabled(true);
result
.setTooltiptext(_("derived exception can not be removed"));
.setTooltiptext(_("inherited exception can not be removed"));
}
return result;
}
@ -1264,7 +1264,7 @@ public abstract class BaseCalendarEditionController extends
Date endDate = dateboxEndDate.getValue();
if (endDate == null) {
throw new WrongValueException(dateboxEndDate,
_("You should select a end date for the exception"));
_("You should select an end date for the exception"));
} else {
Clients.closeErrorBox(dateboxEndDate);
}
@ -1404,7 +1404,7 @@ public abstract class BaseCalendarEditionController extends
return null;
} else {
throw new IllegalArgumentException(
_("Only the last activation period allows to delete end date."));
_("End date can only be deleted in the the last activation"));
}
}
return new LocalDate(endDate);
@ -1438,7 +1438,7 @@ public abstract class BaseCalendarEditionController extends
}
});
code.setConstraint("no empty:" + _("cannot be null or empty"));
code.setConstraint("no empty:" + _("cannot be empty"));
listcell.appendChild(code);
item.appendChild(listcell);

View file

@ -746,7 +746,7 @@ public class ConfigurationController extends GenericForwardComposer {
if (prefixBox.getValue() == null || prefixBox.getValue().isEmpty()) {
throw new WrongValueException(prefixBox,
_("cannot be null or empty"));
_("cannot be empty"));
}
try {

View file

@ -231,7 +231,7 @@ public class ConfigurationModel implements IConfigurationModel {
entitySequenceDAO.remove(entitySequence);
} catch (InstanceNotFoundException e) {
throw new ValidationException(
_("Some sequences to remove not existed"));
_("Some sequences to be removed does not exist"));
} catch (IllegalArgumentException e) {
throw new ValidationException(e.getMessage());
}

View file

@ -345,7 +345,7 @@ public class TemplateModel implements ITemplateModel {
}
private IDesktopUpdate showProgress(int remaining) {
return sendMessage(_("{0} projects reassignation remaining", remaining));
return sendMessage(_("{0} projects remaining to reassign", remaining));
}
private IDesktopUpdate sendMessage(final String message) {

View file

@ -140,12 +140,12 @@ public class CostCategoryCRUDController extends BaseCRUDController<CostCategory>
if (row != null) {
if (hourCost.getType() == null) {
Listbox workHoursType = getWorkHoursType(row);
String message = workHoursType.getItems().isEmpty() ? _("Type of hours is empty. Please, create some type of hours before proceeding")
: _("The type of hours cannot be null");
String message = workHoursType.getItems().isEmpty() ? _("Hours types are empty. Please, create some hours types before proceeding")
: _("cannot be empty");
throw new WrongValueException(getWorkHoursType(row), message);
}
if (hourCost.getPriceCost() == null) {
throw new WrongValueException(getPricePerHour(row), _("Cannot be null or empty"));
throw new WrongValueException(getPricePerHour(row), _("cannot be empty"));
}
}
}
@ -202,7 +202,7 @@ public class CostCategoryCRUDController extends BaseCRUDController<CostCategory>
if (!hourCost.getCategory().isCodeAutogenerated()) {
txtCode.setConstraint("no empty:"
+ _("cannot be null or empty"));
+ _("cannot be empty"));
} else {
txtCode.setConstraint("");
}
@ -302,7 +302,7 @@ public class CostCategoryCRUDController extends BaseCRUDController<CostCategory>
private void appendDecimalboxCost(Row row) {
Decimalbox boxCost = new Decimalbox();
bindDecimalboxCost(boxCost, (HourCost) row.getValue());
boxCost.setConstraint("no empty:" + _("cannot be null or empty"));
boxCost.setConstraint("no empty:" + _("cannot be empty"));
boxCost.setFormat(Util.getMoneyFormat());
row.appendChild(boxCost);
}
@ -459,9 +459,7 @@ public class CostCategoryCRUDController extends BaseCRUDController<CostCategory>
removeHourCost(hourCost);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(
Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", hourCost.getId()), e);
throw new RuntimeException(e);
}
}

View file

@ -146,8 +146,7 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
removeCostCategoryAssignment(assignment);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", assignment.getId()), e);
throw new RuntimeException(e);
}
}
@ -337,4 +336,4 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
return true;
}
}
}

View file

@ -103,7 +103,7 @@ public class TypeOfWorkHoursCRUDController extends BaseCRUDController<TypeOfWork
Messagebox.show(_(message), _("Warning"), Messagebox.OK,
Messagebox.EXCLAMATION);
} catch (InterruptedException e) {
LOG.error(_("Error on showing warning message removing typeOfWorkHours: ", typeOfWorkHours.getId()), e);
throw new RuntimeException(e);
}
}

View file

@ -99,7 +99,7 @@ public class CalendarExceptionTypeModel extends IntegrationEntityModel
@Transactional
public void confirmDelete(CalendarExceptionType exceptionType) throws InstanceNotFoundException, InvalidValueException {
if (calendarExceptionTypeDAO.hasCalendarExceptions(exceptionType)) {
throw new InvalidValueException(_("Cannot remove {0}, since it is being used by some Exception Day", exceptionType.getName()));
throw new InvalidValueException(_("Cannot remove {0}, since it is being used by some exception day", exceptionType.getName()));
}
if (!exceptionType.isNewObject()) {
calendarExceptionTypeDAO.remove(exceptionType.getId());

View file

@ -190,17 +190,17 @@ public class ExpenseSheetCRUDController extends
boolean result = true;
if (expenseSheetModel.getNewExpenseSheetLine().getDate() == null) {
result = false;
throw new WrongValueException(this.dateboxExpenseDate, _("must be not empty"));
throw new WrongValueException(this.dateboxExpenseDate, _("cannot be empty"));
}
if (expenseSheetModel.getNewExpenseSheetLine().getOrderElement() == null) {
result = false;
throw new WrongValueException(this.bandboxTasks, _("must be not empty"));
throw new WrongValueException(this.bandboxTasks, _("cannot be empty"));
}
BigDecimal value = expenseSheetModel.getNewExpenseSheetLine().getValue();
if (value == null || value.compareTo(BigDecimal.ZERO) < 0) {
result = false;
throw new WrongValueException(this.dboxValue,
_("must be not empty and greater or equal than zero"));
_("cannot be empty or less than zero"));
}
return result;
}
@ -215,8 +215,7 @@ public class ExpenseSheetCRUDController extends
removeExpenseSheetLine(expenseSheetLine);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", expenseSheetLine.getId()), e);
throw new RuntimeException(e);
}
}
@ -358,7 +357,7 @@ public class ExpenseSheetCRUDController extends
}
});
dateboxExpense.setConstraint("no empty:" + _("cannot be null or empty"));
dateboxExpense.setConstraint("no empty:" + _("cannot be empty"));
row.appendChild(dateboxExpense);
}
@ -476,7 +475,7 @@ public class ExpenseSheetCRUDController extends
bandboxSearch.setListboxEventListener(Events.ON_OK, eventListenerUpdateOrderElement);
bandboxSearch.setBandboxEventListener(Events.ON_CHANGING,
eventListenerUpdateOrderElement);
bandboxSearch.setBandboxConstraint("no empty:" + _("cannot be null or empty"));
bandboxSearch.setBandboxConstraint("no empty:" + _("cannot be empty"));
row.appendChild(bandboxSearch);
}

View file

@ -118,11 +118,11 @@ public class ExternalCompanyCRUDController extends
appURI.setDisabled(false);
ourCompanyLogin.setDisabled(false);
ourCompanyPassword.setDisabled(false);
appURI.setConstraint("no empty:" + _("cannot be null or empty"));
appURI.setConstraint("no empty:" + _("cannot be empty"));
ourCompanyLogin.setConstraint("no empty:"
+ _("cannot be null or empty"));
+ _("cannot be empty"));
ourCompanyPassword.setConstraint("no empty:"
+ _("cannot be null or empty"));
+ _("cannot be empty"));
}
private void disableInteractionFields() {

View file

@ -295,8 +295,7 @@ public class MaterialsController extends
removeMaterialCategory(materialCategory);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", materialCategory.getId()), e);
throw new RuntimeException(e);
}
}
@ -308,7 +307,7 @@ public class MaterialsController extends
public void addMaterialCategory() {
String categoryName = txtCategory.getValue();
if (categoryName == null || categoryName.isEmpty()) {
throw new WrongValueException(txtCategory, _("cannot be null or empty"));
throw new WrongValueException(txtCategory, _("cannot be empty"));
}
MaterialCategory parent = null;

View file

@ -94,7 +94,7 @@ public class UnitTypeModel extends IntegrationEntityModel implements
try {
return unitTypeDAO.find(unitType.getId());
} catch (InstanceNotFoundException e) {
LOG.error("It was not possible load entity. Not found. Id: "
LOG.error("Could not load entity. Id: "
+ unitType.getId(), e);
throw new RuntimeException(e);
}
@ -180,4 +180,4 @@ public class UnitTypeModel extends IntegrationEntityModel implements
public IntegrationEntity getCurrentEntity() {
return getCurrentUnitType();
}
}
}

View file

@ -156,7 +156,7 @@ public class MonteCarloController extends GenericForwardComposer {
.getValue().intValue() : 0;
if (iterations == 0) {
throw new WrongValueException(ibIterations,
_("Cannot be null or empty"));
_("cannot be empty"));
}
if (iterations < 0 || iterations > MAX_NUMBER_ITERATIONS) {
throw new WrongValueException(ibIterations,

View file

@ -204,9 +204,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends
deleteTaskQualityForm(taskQualityForm);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", taskQualityForm
.getId()), e);
throw new RuntimeException(e);
}
}
@ -520,14 +518,14 @@ public class AssignedTaskQualityFormsToOrderElementController extends
&& (!item.checkConstraintIfDateCanBeNull())) {
item.setDate(null);
throw new WrongValueException(comp,
_("date not specified."));
_("date not specified"));
}
if (!assignedTaskQualityFormsToOrderElementModel
.isCorrectConsecutiveDate(taskQualityForm, item)) {
item.setDate(null);
throw new WrongValueException(
comp,
_("must be greater than the previous date."));
_("must be after the previous date"));
}
}
}

View file

@ -263,7 +263,7 @@ public class AssignedTaskQualityFormsToOrderElementModel implements
if ((!taskQualityForm.isByItems())
&& (!taskQualityForm.isCorrectConsecutivePassed(item))) {
throw new ValidationException(new InvalidValue(
_("can not pass until the previous item is passed."),
_("can not pass until the previous item is passed"),
TaskQualityForm.class,
"passed", item.getName(), taskQualityForm));
@ -271,7 +271,7 @@ public class AssignedTaskQualityFormsToOrderElementModel implements
if ((!taskQualityForm.isByItems())
&& (!taskQualityForm.isCorrectConsecutiveDate(item))) {
throw new ValidationException(new InvalidValue(
_("must be greater than the previous date."),
_("must be after the previous date"),
TaskQualityForm.class,
"date", item.getName(), taskQualityForm));
}

View file

@ -136,7 +136,7 @@ public class ManageOrderElementAdvancesController extends
manageOrderElementAdvancesModel.confirmSave();
return true;
} catch (DuplicateAdvanceAssignmentForOrderElementException e) {
messagesForUser.showMessage(Level.ERROR, _("cannot include a progress of the same progress type twice"));
messagesForUser.showMessage(Level.ERROR, _("Cannot create another progress of the same type"));
} catch (DuplicateValueTrueReportGlobalAdvanceException e) {
messagesForUser.showMessage(
Level.ERROR, _("spread values are not valid, at least one value should be true"));
@ -145,7 +145,7 @@ public class ManageOrderElementAdvancesController extends
} catch (InstanceNotFoundException e) {
messagesForUser.showMessage(
Level.ERROR, e.getMessage());
LOG.error(_("Couldn't find element: {0}", e.getKey()), e);
LOG.error("Couldn't find element: " + e.getKey(), e);
}
increaseScreenHeight();
return false;
@ -950,7 +950,7 @@ public class ManageOrderElementAdvancesController extends
if (advance.getAdvanceType() == null) {
throw new WrongValueException(
getComboboxTypeBy(listItem),
_("Value is not valid, the type must be not empty"));
_("cannot be empty"));
}
DirectAdvanceAssignment directAdvanceAssignment;
@ -964,7 +964,7 @@ public class ManageOrderElementAdvancesController extends
&& directAdvanceAssignment.getMaxValue() == null) {
throw new WrongValueException(
getDecimalboxMaxValueBy(listItem),
_("Value is not valid, the current value must be not empty"));
_("cannot be empty"));
}
}
}
@ -1297,7 +1297,7 @@ public class ManageOrderElementAdvancesController extends
}
private void showMessageDeleteSpread() {
String message = _("This progress can not be removed, because it is spread. It is necessary to select another progress as spread.");
String message = _("Spread progress cannot be removed. Please select another progress as spread.");
showErrorMessage(message);
}
@ -1418,7 +1418,7 @@ public class ManageOrderElementAdvancesController extends
advanceMeasurement.setDate(null);
((Datebox) comp).setValue(null);
throw new WrongValueException(comp,
_("The date is not valid, the date must be not empty"));
_("cannot be empty"));
} else {
String errorMessage = validateDateAdvanceMeasurement(
new LocalDate(value), advanceMeasurement);
@ -1445,7 +1445,7 @@ public class ManageOrderElementAdvancesController extends
if (((BigDecimal) value) == null) {
throw new WrongValueException(
comp,
_("Value is not valid, the current value must be not empty"));
_("cannot be empty"));
} else {
String errorMessage = validateValueAdvanceMeasurement(advanceMeasurement);
if (errorMessage != null) {

View file

@ -832,9 +832,7 @@ public class OrderCRUDController extends GenericForwardComposer {
remove(order);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(
Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", order.getId()), e);
throw new RuntimeException(e);
}
}
else {
@ -864,23 +862,21 @@ public class OrderCRUDController extends GenericForwardComposer {
.showMessage(
Level.ERROR,
_(
"You can not remove the project \"{0}\" because of any of its tasks are already in use in some timesheets and the project just exists in the current scenario",
"You can not remove the project \"{0}\" because it has work reported on it or any of its tasks",
order.getName()));
} else {
if (!StringUtils.isBlank(order.getExternalCode())) {
try {
if (Messagebox
.show(
_("Deleting this subcontracted project, you are going to lose the relation to report progress. Are you sure?"),
_("This is a subcontracted project, if you delete it you can not report progress anymore. Are you sure?"),
_("Confirm"), Messagebox.OK
| Messagebox.CANCEL,
Messagebox.QUESTION) == Messagebox.CANCEL) {
return;
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", order
.getId()), e);
throw new RuntimeException(e);
}
}
@ -1322,7 +1318,7 @@ public class OrderCRUDController extends GenericForwardComposer {
&& (finishDate.compareTo(filterStartDate.getValue()) < 0)) {
filterFinishDate.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};
@ -1506,7 +1502,7 @@ public class OrderCRUDController extends GenericForwardComposer {
if (StringUtils.isBlank((String) value)) {
throw new WrongValueException(comp,
_("cannot be null or empty"));
_("cannot be empty"));
}
try {
Order found = orderDAO
@ -1530,7 +1526,7 @@ public class OrderCRUDController extends GenericForwardComposer {
if (StringUtils.isBlank((String) value)) {
throw new WrongValueException(comp,
_("cannot be null or empty"));
_("cannot be empty"));
}
try {
Order found = orderDAO

View file

@ -674,7 +674,7 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
.getValue()) < 0)) {
filterFinishDateOrderElement.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};
@ -715,7 +715,7 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
messagesForUser
.showMessage(
Level.ERROR,
_("You can not remove the task \"{0}\" because of this or any of its children are already in use in some timesheets",
_("You can not remove the task \"{0}\" because it has work reported on it or any of its children",
element.getName()));
} else {
super.remove(element);

View file

@ -89,7 +89,7 @@ public class OrdersTreeComponent extends TreeComponent {
});
columns.add(new OrdersTreeColumn(_("Must start after"),
"estimated_init",
_("Date which the task must start after (press enter in textbox to open calendar popup or type in date directly)")) {
_("Estimated init date for the task (press enter in textbox to open calendar popup or type in date directly)")) {
@Override
protected void doCell(OrderElementTreeitemRenderer treeRenderer,

View file

@ -164,7 +164,7 @@ public class ProjectDetailsController extends GenericForwardComposer {
}
private void showWrongValue() {
throw new WrongValueException(initDate, _("cannot be null or empty"));
throw new WrongValueException(initDate, _("cannot be empty"));
}
private void showWrongName() {
@ -233,7 +233,7 @@ public class ProjectDetailsController extends GenericForwardComposer {
deadline.setValue(null);
getOrder().setDeadline(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};

View file

@ -260,9 +260,7 @@ public abstract class AssignedCriterionRequirementController<T, M> extends
updateCriterionsWithDiferentResourceType(hoursGroupWrapper);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ",
hoursGroupWrapper.getHoursGroup().getId()), e);
throw new RuntimeException(e);
}
}
Util.reloadBindings(listHoursGroups);
@ -319,7 +317,7 @@ public abstract class AssignedCriterionRequirementController<T, M> extends
Bandbox bandType = getBandType(requirementWrapper, row);
bandType.setValue(null);
throw new WrongValueException(bandType,
_("The criterion and its type cannot be null"));
_("cannot be empty"));
}
}

View file

@ -123,7 +123,7 @@ public abstract class AssignedLabelsController<T, M> extends
final String labelName = txtLabelName.getValue();
if (labelName == null || labelName.isEmpty()) {
throw new WrongValueException(txtLabelName,
_("cannot be null or empty"));
_("cannot be empty"));
}
// Label does not exist, create

View file

@ -391,7 +391,7 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
removeMaterialAssignment(materialAssignment);
}
} catch (InterruptedException e) {
LOG.error(_("Error on showing delete confirm"), e);
throw new RuntimeException(e);
}
}
@ -479,9 +479,9 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
splitMaterialAssignment(materialAssignment, dbUnits.getValue());
}
} catch (SuspendNotAllowedException e) {
LOG.error(_("Error on splitting"), e);
throw new RuntimeException(e);
} catch (InterruptedException e) {
LOG.error(_("Error on splitting"), e);
throw new RuntimeException(e);
}
}

View file

@ -674,7 +674,7 @@ public class FormBinder {
public void markNoEmptyResourcesPerDay(List<AllocationRow> rows) {
Validate.isTrue(!rows.isEmpty());
final String message = _("resources per day must be not empty and bigger than zero");
final String message = _("resources per day cannot be empty or less than zero");
if (!recommendedAllocation) {
AllocationRow first = rows.get(0);
throw new WrongValueException(

View file

@ -282,13 +282,13 @@ public class StretchesFunctionModel implements IStretchesFunctionModel {
throws IllegalArgumentException {
if (date.compareTo(task.getStartDate()) < 0) {
throw new IllegalArgumentException(
_("Stretch date must not be less than task start date: "
_("Stretch date must not be before task start date: "
+ sameFormatAsDefaultZK(task.getStartDate())));
}
if (date.compareTo(taskEndDate) > 0) {
throw new IllegalArgumentException(
_("Stretch date must not be greater than the task's end date: "
_("Stretch date must not be after task end date: "
+ sameFormatAsDefaultZK(taskEndDate)));
}

View file

@ -254,7 +254,7 @@ public class CompanyPlanningController implements Composer {
filterStartDate.getRawValue()) < 0)) {
filterFinishDate.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};

View file

@ -322,7 +322,7 @@ public class OrderPlanningController implements Composer {
.getValue()) < 0)) {
filterFinishDateOrderElement.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}

View file

@ -140,7 +140,7 @@ public class ReassignController extends GenericForwardComposer {
Date value = associatedDate.getValue();
if (value == null) {
throw new WrongValueException(associatedDate,
_("must be not empty"));
_("cannot be empty"));
}
}
window.setVisible(false);

View file

@ -21,8 +21,6 @@
package org.libreplan.web.print;
import static org.zkoss.ganttz.i18n.I18nHelper._;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@ -243,11 +241,11 @@ public class CutyPrint {
}
Executions.getCurrent().sendRedirect(filename, "_blank");
} catch (Exception e) {
LOG.error(_("Could open generated PDF"), e);
LOG.error("Could open generated PDF", e);
}
} catch (IOException e) {
LOG.error(_("Could not execute print command"), e);
LOG.error("Could not execute print command", e);
}
}
@ -340,7 +338,7 @@ public class CutyPrint {
out.close();
} catch (FileNotFoundException ex) {
LOG.error(ex.getMessage() + _(" in the specified directory."));
LOG.error(ex.getMessage() + " in the specified directory.", ex);
System.exit(0);
} catch (IOException e) {
LOG.error(e.getMessage());

View file

@ -250,7 +250,7 @@ public class QualityFormCRUDController extends BaseCRUDController<QualityForm> {
.checkConstraintOutOfRangeQualityFormItemPercentage(item)) {
item.setPercentage(null);
throw new WrongValueException(comp,
_("percentage must be in range (0,100]"));
_("percentage should be between 1 and 100"));
}
if (!qualityFormModel
.checkConstraintUniqueQualityFormItemPercentage()) {
@ -391,9 +391,7 @@ public class QualityFormCRUDController extends BaseCRUDController<QualityForm> {
Messagebox.show(_(message), _("Warning"), Messagebox.OK,
Messagebox.EXCLAMATION);
} catch (InterruptedException e) {
LOG.error(
_("Error on showing warning message removing qualityForm: ",
qualityForm.getId()), e);
throw new RuntimeException(e);
}
}
}

View file

@ -158,7 +158,7 @@ public class OrderCostsPerResourceController extends LibrePlanReportController {
&& (endingDate.compareTo(getStartingDate()) < 0)) {
((Datebox) comp).setValue(null);
throw new WrongValueException(comp,
_("must be greater than finish date"));
_("must be after finish date"));
}
}
};

View file

@ -132,7 +132,7 @@ public class CriterionTreeController extends GenericForwardComposer {
criterionForThisRow.setName(value);
}
}));
String message = _("cannot be null or empty");
String message = _("cannot be empty");
textboxName
.setConstraint("no empty:"+message);

View file

@ -405,7 +405,7 @@ public class MachineCRUDController extends BaseCRUDController<Machine> {
&& (finishDate.compareTo(filterStartDate.getValue()) < 0)) {
filterFinishDate.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};
@ -551,7 +551,7 @@ public class MachineCRUDController extends BaseCRUDController<Machine> {
machineModel.confirmRemove(machine);
} catch (InstanceNotFoundException e) {
messagesForUser.showMessage(Level.INFO,
_("This machine was already removed by other user"));
_("Machine was already removed"));
}
}

View file

@ -219,7 +219,7 @@ public class MachineConfigurationController extends GenericForwardComposer {
if (startDateBox.getValue().compareTo((Date) value) > 0) {
throw new WrongValueException(
comp,
_("End date is not valid, the new end date must be greater than the start date"));
_("End date is not valid, the new end date after the start date"));
}
}
}

View file

@ -179,11 +179,11 @@ public class CriterionsController extends GenericForwardComposer {
}
if(assignedCriterionsModel.checkSameCriterionAndSameInterval(satisfaction)){
throw new WrongValueException(comp,
_("Criterion is not valid, it overlaps other criterionSatisfaction with the same criterion"));
_("Criterion already assigned"));
}
if(assignedCriterionsModel.checkNotAllowSimultaneousCriterionsPerResource(satisfaction)){
throw new WrongValueException(comp,
_("CriterionType is not valid, it overlaps other criterionSatisfaction with the same criterionType"));
_("This type of criteria cannot have multiple values in the same period"));
}
}
@ -209,7 +209,7 @@ public class CriterionsController extends GenericForwardComposer {
(CriterionSatisfactionDTO)((Row) comp.getParent()).getValue();
if(value == null) {
throw new WrongValueException(comp,
_("Start date cannot be null"));
_("cannot be empty"));
}
if(!criterionSatisfactionDTO.isLessToEndDate((Date) value)){
throw new WrongValueException(comp,
@ -236,10 +236,10 @@ public class CriterionsController extends GenericForwardComposer {
(CriterionSatisfactionDTO)((Row) comp.getParent()).getValue();
if(!criterionSatisfactionDTO.isGreaterStartDate((Date) value)){
throw new WrongValueException(comp,
_("End date is not valid, the new end date must be greater than the start date"));
_("End date is not valid, the new end date after the start date"));
}else if(!criterionSatisfactionDTO.isPostEndDate((Date) value)){
throw new WrongValueException(comp,
_("End date is not valid, the new end date must be later the current end date"));
_("End date is not valid, the new end date must be after the current end date"));
}
}
@ -340,7 +340,7 @@ public class CriterionsController extends GenericForwardComposer {
// Value is incorrect, clear
startDate.setValue(null);
throw new WrongValueException(startDate,
_("The start date cannot be null"));
_("cannot be empty"));
}
if (CriterionSatisfactionDTO.CRITERION_WITH_ITS_TYPE.equals(propertyName)) {
// Locate TextboxResource
@ -348,7 +348,7 @@ public class CriterionsController extends GenericForwardComposer {
// Value is incorrect, clear
bandType.setValue(null);
throw new WrongValueException(bandType,
_("The criterion and its type cannot be null"));
_("cannot be empty"));
}
}
}

View file

@ -179,12 +179,12 @@ public class CriterionsMachineController extends GenericForwardComposer {
if (assignedMachineCriterionsModel
.checkSameCriterionAndSameInterval(satisfaction)) {
throw new WrongValueException(comp,
_("Criterion is not valid, the criterion overlap other criterionSatisfaction whith same criterion"));
_("Criterion already assigned"));
}
if (assignedMachineCriterionsModel
.checkNotAllowSimultaneousCriterionsPerResource(satisfaction)) {
throw new WrongValueException(comp,
_("CriterionType is not valid, the criterionType overlap other criterionSatisfaction whith same criterionType"));
_("This type of criteria cannot have multiple values in the same period"));
}
}
@ -211,11 +211,11 @@ public class CriterionsMachineController extends GenericForwardComposer {
if (!criterionSatisfactionDTO.isGreaterStartDate((Date) value)) {
throw new WrongValueException(
comp,
_("End date is not valid, the new end date must be greater than the start date"));
_("End date is not valid, the new end date must be after the start date"));
} else if (!criterionSatisfactionDTO.isPostEndDate((Date) value)) {
throw new WrongValueException(
comp,
_("End date is not valid, the new end date must be later the current end date"));
_("End date is not valid, the new end date must be after the current end date"));
}
}
@ -233,7 +233,7 @@ public class CriterionsMachineController extends GenericForwardComposer {
CriterionSatisfactionDTO criterionSatisfactionDTO = (CriterionSatisfactionDTO) ((Row) comp
.getParent()).getValue();
if (value == null) {
throw new WrongValueException(comp, _("Start date cannot be null"));
throw new WrongValueException(comp, _("cannot be empty"));
}
if (!criterionSatisfactionDTO.isLessToEndDate((Date) value)) {
throw new WrongValueException(
@ -345,7 +345,7 @@ public class CriterionsMachineController extends GenericForwardComposer {
// Value is incorrect, clear
startDate.setValue(null);
throw new WrongValueException(startDate,
_("The start date cannot be null"));
_("cannot be empty"));
}
if (CriterionSatisfactionDTO.CRITERION_WITH_ITS_TYPE
.equals(propertyName)) {
@ -354,7 +354,7 @@ public class CriterionsMachineController extends GenericForwardComposer {
// Value is incorrect, clear
bandType.setValue(null);
throw new WrongValueException(bandType,
_("The criterion and its type cannot be null"));
_("cannot be empty"));
}
}
}

View file

@ -301,13 +301,13 @@ public class WorkerCRUDController extends GenericForwardComposer implements
String loginName = loginNameTextbox.getValue();
if (StringUtils.isBlank(loginName)) {
throw new WrongValueException(loginNameTextbox,
_("cannot be null or empty"));
_("cannot be empty"));
}
String password = passwordTextbox.getValue();
if (StringUtils.isBlank(loginName)) {
throw new WrongValueException(passwordTextbox,
_("cannot be null or empty"));
_("cannot be empty"));
}
String passwordConfirmation = passwordConfirmationTextbox.getValue();
@ -765,7 +765,7 @@ public class WorkerCRUDController extends GenericForwardComposer implements
&& (finishDate.compareTo(filterStartDate.getValue()) < 0)) {
filterFinishDate.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};

View file

@ -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 called \"{0}\"", PredefinedScenarios.MASTER.getName()));
_("You can not remove the default scenario \"{0}\"", PredefinedScenarios.MASTER.getName()));
}
Scenario currentScenario = scenarioManager.getCurrent();

View file

@ -392,7 +392,7 @@ public class OrderTemplatesController extends GenericForwardComposer implements
}
}
} catch (InterruptedException e) {
LOG.error(_("Error on showing delete confirm"), e);
throw new RuntimeException(e);
}
}

View file

@ -308,13 +308,13 @@ public class OrderTemplatesModel implements IOrderTemplatesModel {
public void validateTemplateName(String name)
throws IllegalArgumentException {
if ((name == null) || (name.isEmpty())) {
throw new IllegalArgumentException(_("the name must be not empty"));
throw new IllegalArgumentException(_("the name cannot be empty"));
}
getTemplate().setName(name);
if (!getTemplate().checkConstraintUniqueRootTemplateName()) {
throw new IllegalArgumentException(
_("There exists other template with the same name."));
_("Already exists other template with the same name"));
}
}

View file

@ -107,7 +107,7 @@ public class TemplatesTreeController extends
element.setName(value);
}
});
textBox.setConstraint("no empty:" + _("cannot be null or empty"));
textBox.setConstraint("no empty:" + _("cannot be empty"));
addCell(textBox);
putNameTextbox(element, textBox);
}

View file

@ -970,7 +970,7 @@ public abstract class TreeController<T extends ITreeNode<T>> extends
if (!readOnly && element.isLeaf()) {
if (getHoursGroupHandler().hasMoreThanOneHoursGroup(element)) {
boxHours.setReadonly(true);
tc.setTooltiptext(_("Not editable for containing more that an hours group."));
tc.setTooltiptext(_("Disabled because of it contains more than one hours group"));
} else {
boxHours.setReadonly(false);
tc.setTooltiptext("");

View file

@ -155,9 +155,7 @@ public class ProfileCRUDController extends BaseCRUDController<Profile> {
Messagebox.show(_(message), _("Warning"), Messagebox.OK,
Messagebox.EXCLAMATION);
} catch (InterruptedException e) {
LOG.error(
_("Error on showing warning message removing typeOfWorkHours: ",
profile.getId()), e);
throw new RuntimeException(e);
}
}
@Override

View file

@ -218,9 +218,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
Util.reloadBindings(listWindow);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(
Level.ERROR, e.getMessage());
LOG.error(_("Error on removing element: ", workReport.getId()), e);
throw new RuntimeException(e);
}
}
@ -313,21 +311,21 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
if (!getWorkReport()
.checkConstraintDateMustBeNotNullIfIsSharedByLines()) {
Datebox datebox = (Datebox) createWindow.getFellowIfAny("date");
showInvalidMessage(datebox, _("Date cannot be null"));
showInvalidMessage(datebox, _("cannot be empty"));
return false;
}
if (!getWorkReport()
.checkConstraintResourceMustBeNotNullIfIsSharedByLines()) {
showInvalidMessage(autocompleteResource,
_("Resource cannot be null"));
_("cannot be empty"));
return false;
}
if (!getWorkReport()
.checkConstraintOrderElementMustBeNotNullIfIsSharedByLines()) {
showInvalidMessage(bandboxSelectOrderElementInHead,
_("Task code cannot be null"));
_("cannot be empty"));
return false;
}
return true;
@ -356,7 +354,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
} else if (workReportLine.getDate() == null) {
Datebox date = getDateboxDate(row);
if (date != null) {
String message = _("The date cannot be null");
String message = _("cannot be empty");
showInvalidMessage(date, message);
}
return false;
@ -369,7 +367,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
} else if (workReportLine.getResource() == null) {
Autocomplete autoResource = getTextboxResource(row);
if (autoResource != null) {
String message = _("The resource cannot be null");
String message = _("cannot be empty");
showInvalidMessage(autoResource, message);
}
return false;
@ -382,7 +380,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
} else if (workReportLine.getOrderElement() == null) {
BandboxSearch bandboxOrder = getTextboxOrder(row);
if (bandboxOrder != null) {
String message = _("The task code cannot be null");
String message = _("cannot be empty");
bandboxOrder.clear();
showInvalidMessage(bandboxOrder, message);
}
@ -393,7 +391,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
.checkConstraintClockStartMustBeNotNullIfIsCalculatedByClock()) {
Timebox timeStart = getTimeboxStart(row);
if (timeStart != null) {
String message = _("Time Start cannot be null");
String message = _("cannot be empty");
showInvalidMessage(timeStart, message);
}
return false;
@ -403,7 +401,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
.checkConstraintClockFinishMustBeNotNullIfIsCalculatedByClock()) {
Timebox timeFinish = getTimeboxFinish(row);
if (timeFinish != null) {
String message = _("Time finish cannot be null");
String message = _("cannot be empty");
showInvalidMessage(timeFinish, message);
}
return false;
@ -412,7 +410,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
if (workReportLine.getEffort() == null) {
Textbox effort = getEffort(row);
if (effort == null) {
String message = _("Effort cannot be null");
String message = _("cannot be empty");
showInvalidMessage(effort, message);
}
if (EffortDuration.parseFromFormattedString(effort.getValue())
@ -436,8 +434,8 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
// Locate TextboxOrder
Listbox autoTypeOfHours = getTypeOfHours(row);
if (autoTypeOfHours != null) {
String message = autoTypeOfHours.getItems().isEmpty() ? _("Type of hours is empty. Please, create some type of hours before proceeding")
: _("The type of hours cannot be null");
String message = autoTypeOfHours.getItems().isEmpty() ? _("Hours types are empty. Please, create some hours types before proceeding")
: _("cannot be empty");
showInvalidMessage(autoTypeOfHours, message);
}
return false;
@ -449,7 +447,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
// Locate TextboxCode
Textbox txtCode = getCode(row);
if (txtCode != null) {
String message = _("The code cannot be empty.");
String message = _("cannot be empty.");
showInvalidMessage(txtCode, message);
}
return false;
@ -1225,9 +1223,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
removeWorkReportLine(workReportLine);
}
} catch (InterruptedException e) {
messagesForUser.showMessage(
Level.ERROR, e.getMessage());
LOG.error(_("Error on showing removing element: ", workReportLine.getId()), e);
throw new RuntimeException(e);
}
}
@ -1504,7 +1500,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
&& (finishDate.compareTo(filterStartDate.getValue()) < 0)) {
filterFinishDate.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be later than start date"));
}
}
};
@ -1521,7 +1517,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
&& (startDate.compareTo(filterFinishDate.getValue()) > 0)) {
filterStartDate.setValue(null);
throw new WrongValueException(comp,
_("must be lower than finish date"));
_("must be before finish date"));
}
}
};

View file

@ -135,7 +135,7 @@ public class WorkReportQueryController extends GenericForwardComposer {
.getValue()) < 0)) {
filterFinishDateLine.setValue(null);
throw new WrongValueException(comp,
_("must be greater than start date"));
_("must be after start date"));
}
}
};
@ -339,7 +339,7 @@ public class WorkReportQueryController extends GenericForwardComposer {
.goToCreateOrEditForm(line.getLocalDate());
} else {
messagesForUser.showMessage(Level.WARNING,
_("You do not have permissions to edit this work report"));
_("You do not have permissions to edit this timesheet"));
}
}

View file

@ -654,7 +654,7 @@ public class WorkReportTypeCRUDController extends BaseCRUDController<WorkReportT
workReportLabelTypeAssigment.setLabelType(null);
throw new WrongValueException(
comboLabelTypes,
_("This label type already is assigned to the timesheet template."));
_("Label type already assigned"));
}
}
@ -903,7 +903,7 @@ public class WorkReportTypeCRUDController extends BaseCRUDController<WorkReportT
messagesForUserSortedLabelsAndFields
.showMessage(
Level.ERROR,
_("The index fields and labels must be uniques and consecutives"));
_("Index fields and labels must be unique and consecutive"));
}
}
@ -975,9 +975,7 @@ public class WorkReportTypeCRUDController extends BaseCRUDController<WorkReportT
.show(_("Cannot delete timesheet template. There are some timesheets bound to it."),
_("Warning"), Messagebox.OK, Messagebox.EXCLAMATION);
} catch (InterruptedException e) {
LOG.error(
_("Error on showing warning message removing workReportType: ",
workReportType.getHumanId()), e);
throw new RuntimeException(e);
}
return false;
}

View file

@ -394,13 +394,13 @@ public class WorkReportTypeModel extends IntegrationEntityModel implements
throws IllegalArgumentException {
if ((name == null) || (name.isEmpty())) {
throw new IllegalArgumentException(
_("the name must be not null or not empty"));
_("the name cannot be empty"));
}
getWorkReportType().setName(name);
if (!getWorkReportType().checkConstraintUniqueWorkReportTypeName()) {
throw new IllegalArgumentException(
_("There exists other workReportType with the same name."));
_("There is another timesheet template with the same name"));
}
}
@ -409,7 +409,7 @@ public class WorkReportTypeModel extends IntegrationEntityModel implements
throws IllegalArgumentException {
if ((code == null) || (code.isEmpty())) {
throw new IllegalArgumentException(
_("the code must be not null or not empty"));
_("the code cannot be empty"));
}
if (code.contains("_")) {
throw new IllegalArgumentException(
@ -419,7 +419,7 @@ public class WorkReportTypeModel extends IntegrationEntityModel implements
getWorkReportType().setCode(code);
if (!getWorkReportType().checkConstraintUniqueCode()) {
throw new IllegalArgumentException(
_("Exist other workReportType with the same code."));
_("There is another timesheet template with the same code"));
}
}

View file

@ -303,8 +303,8 @@ public final class CalendarConverter {
result.put(day, capacity);
} catch (IllegalArgumentException e) {
throw new ValidationException("a day is not valid");
} catch(NullPointerException e){
throw new ValidationException("a day is empty");
} catch (NullPointerException e) {
throw new ValidationException("a day is null");
}
}
}
@ -356,4 +356,4 @@ public final class CalendarConverter {
return versions;
}
}
}

View file

@ -821,7 +821,7 @@ public final class OrderElementConverter {
} catch (DuplicateValueTrueReportGlobalAdvanceException e) {
throw new ValidationException(
MessageFormat
.format("Duplicate value true report global progress for task {0}",
.format("More than one progress marked as report global for task {0}",
orderElement.getCode()));
} catch (DuplicateAdvanceAssignmentForOrderElementException e) {
throw new ValidationException(MessageFormat.format(

View file

@ -464,7 +464,7 @@ public final class WorkReportConverter {
updateLabel(labelDTO, labels);
} catch (InstanceNotFoundException e) {
throw new ValidationException(
"a work report line has not this label type assigned");
"there are not work report lines with assigned labels of this type");
}
}
}

View file

@ -40,7 +40,7 @@
<label value="${i18n:_('Name')}" />
<textbox
value="@{calendarController.editionController.baseCalendar.name}"
width="300px" constraint="no empty:${i18n:_('cannot be null or empty')}"
width="300px" constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="calendarController.updateWindowTitle()" />
</row>
<row>
@ -55,7 +55,7 @@
<hbox>
<textbox id="txtCode"
value="@{calendarController.editionController.baseCalendar.code}"
width="250px" constraint="no empty:${i18n:_('cannot be null or empty')}"
width="250px" constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{calendarController.baseCalendar.codeAutogenerated}" />
<checkbox label="${i18n:_('Generate code')}"
onCheck="calendarController.editionController.onCheckGenerateCode(event)"

View file

@ -57,7 +57,7 @@
value="${i18n:_('Company code')}" />
<textbox id="companyCode"
value="@{configurationController.companyCode}"
constraint="no empty:${i18n:_('Cannot be empty or null')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
</row>
<row>
<label
@ -69,7 +69,7 @@
selectedElement="@{configurationController.defaultCalendar}" />
</row>
<row>
<label value="${i18n:_('Type of hours for monthly timesheets')}" />
<label value="${i18n:_('Hours type for monthly timesheets')}" />
<bandboxSearch
finder="TypeOfWorkHoursBandboxFinder"
selectedElement="@{configurationController.monthlyTimesheetsTypeOfWorkHours, access='both'}" />
@ -104,7 +104,7 @@
<checkbox id="enableAutocompleteLogin"
label="${i18n:_('Enable/Disable')}"
disabled="@{configurationController.isChangedDefaultPasswdAdmin}"
tooltiptext = "${i18n:_('Enable/Disable autocomplete property in login form, if the admin password is still in default')}"
tooltiptext = "${i18n:_('Enable/Disable autocomplete property in login form, if the admin password is still the default one')}"
checked="@{configurationController.autocompleteLogin}"
onCheck="configurationController.reloadGeneralConfiguration();" />
</row>

View file

@ -41,7 +41,7 @@
<hbox>
<textbox disabled="@{controller.costCategory.codeAutogenerated}"
id="code" value="@{controller.costCategory.code}" width="300px"
constraint = "no empty:${i18n:_('cannot be null or empty')}"/>
constraint = "no empty:${i18n:_('cannot be empty')}"/>
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"
checked="@{controller.costCategory.codeAutogenerated}" />
@ -51,7 +51,7 @@
<label value="${i18n:_('Name')}:" />
<textbox id="name"
value="@{controller.costCategory.name}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()"/>
</row>
<row>

View file

@ -40,7 +40,7 @@
<textbox visible = "@{controller.editable}"
disabled="@{controller.exceptionDayType.codeAutogenerated}"
id="code" value="@{controller.exceptionDayType.code}" width="300px"
constraint = "no empty:${i18n:_('cannot be null or empty')}"/>
constraint = "no empty:${i18n:_('cannot be empty')}"/>
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"
checked="@{controller.exceptionDayType.codeAutogenerated}"/>
@ -51,7 +51,7 @@
<textbox id="tbName"
value="@{controller.exceptionDayType.name}"
width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()" />
</row>
<row>
@ -65,7 +65,7 @@
<div id="colorSampleOwn" sclass="color-sample" style="@{controller.styleColorOwnException}" />
<label value="${i18n:_('Own exception')}" />
<div id="colorSampleDerived" sclass="color-sample" style="@{controller.styleColorDerivedException}" />
<label value="${i18n:_('Derived exception')}" />
<label value="${i18n:_('Inherited exception')}" />
</hbox>
</row>
<row>

View file

@ -40,14 +40,14 @@
<label value="${i18n:_('Company name')}:" />
<textbox id="name"
value="@{controller.company.name}" width="500px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()"/>
</row>
<row>
<label value="${i18n:_('Company ID')}:" />
<textbox id="nif"
value="@{controller.company.nif}"
constraint="no empty:${i18n:_('cannot be null or empty')}"/>
constraint="no empty:${i18n:_('cannot be empty')}"/>
</row>
<row>
<label value="${i18n:_('Client')}:" />

View file

@ -42,7 +42,7 @@
<label value="${i18n:_('Name')}" />
<textbox id="label_type_name"
width="500px" value="@{controller.labelType.name}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()" />
</row>
<row>
@ -50,7 +50,7 @@
<hbox>
<textbox width="350px"
value="@{controller.labelType.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.labelType.codeAutogenerated}" />
<checkbox id="generateCode"
label="${i18n:_('Generate code')}"
@ -86,12 +86,12 @@
<textbox value="@{label.name}"
width="95%"
onChange="controller.onChangeLabelName(event)"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<textbox value="@{label.code}"
width="95%"
disabled="@{controller.labelType.codeAutogenerated}"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<button sclass="icono"
image="/common/img/ico_borrar1.png"

View file

@ -91,9 +91,9 @@
<row self="@{each='material'}" value="@{material}" >
<textbox id="code" value="@{material.code}" width="95%"
disabled="@{material.category.codeAutogenerated}"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<textbox value="@{material.description}" width="95%"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<decimalbox value="@{material.defaultUnitPrice}"
format="@{materialsController.moneyFormat}" />
<listbox mold="select" model="@{materialsController.unitTypes}"

View file

@ -93,7 +93,7 @@
<label value="${i18n:_('Number of iterations')}" />
<intbox id="ibIterations"
width="200px"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<button id="btnRunMonteCarlo" label="${i18n:_('Go!')}" />
<progressmeter id="progressMonteCarloCalculation" value="0" />
</row>

View file

@ -226,14 +226,14 @@
</columns>
<rows>
<row>
<label value="${i18n:_('Because of hours')}:" />
<label value="${i18n:_('Cost of hours')}:" />
<hbox>
<label value="@{assignedHoursToOrderElementController.costOfHours}" />
<label value="@{assignedHoursToOrderElementController.currencySymbol}" />
</hbox>
</row>
<row>
<label value="${i18n:_('Because of expenses')}:" />
<label value="${i18n:_('Cost of expenses')}:" />
<hbox>
<label value="@{assignedHoursToOrderElementController.costOfExpenses}" />
<label value="@{assignedHoursToOrderElementController.currencySymbol}" />

View file

@ -32,13 +32,13 @@
<label value="${i18n:_('Task name')}" />
<textbox id="name"
value="@{detailsController.orderElement.name}"
constraint="no empty:${i18n:_('Cannot be empty or null')}" width="500px" />
constraint="no empty:${i18n:_('cannot be empty')}" width="500px" />
</row>
<row>
<label value="${i18n:_('Code ')}" />
<textbox id="code"
value="@{detailsController.orderElement.code}"
constraint="no empty:${i18n:_('Cannot be empty or null')}" width="150px"
constraint="no empty:${i18n:_('cannot be empty')}" width="150px"
disabled="@{detailsController.isCodeAutogenerated}" />
</row>
<row>

View file

@ -35,7 +35,7 @@
<row>
<label value="${i18n:_('Name')}" />
<textbox id="txtName" value="@{projectController.order.name}" width="500px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onOK="projectController.accept();"/>
</row>
<row>
@ -49,7 +49,7 @@
<hbox>
<textbox id="txtCode" value="@{projectController.order.code}" width="250px"
disabled="@{projectController.codeAutogenerated}"
constraint="no empty:${i18n:_('cannot be null or empty')}"/>
constraint="no empty:${i18n:_('cannot be empty')}"/>
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
checked="@{projectController.codeAutogenerated}"/>
</hbox>

View file

@ -40,7 +40,7 @@
<label value="${i18n:_('Name')}" />
<textbox id="name"
value="@{controller.profile.profileName}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()"/>
</row>
</rows>

View file

@ -43,7 +43,7 @@
<row>
<label value="${i18n:_('Type')}" />
<combobox id="resourceCombobox" autodrop="true"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onChange="controller.setResource(self.selectedItem)" />
</row>
<row>
@ -71,7 +71,7 @@
<label value="${i18n:_('Code')}" />
<hbox>
<textbox width="250px" value="@{controller.criterionType.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.criterionType.codeAutogenerated}" />
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"

View file

@ -45,7 +45,7 @@
<label value="${i18n:_('Code')}" />
<hbox>
<textbox width="350px" value="@{controller.machine.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.machine.codeAutogenerated}" />
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"
@ -55,13 +55,13 @@
<row>
<label value="${i18n:_('Name')}" />
<textbox value="@{controller.machine.name}" width="500px"
constraint="no empty:${i18n:_('Name cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()" />
</row>
<row>
<label value="${i18n:_('Description')}" />
<textbox value="@{controller.machine.description}" width="500px"
constraint="no empty:${i18n:_('Description cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
</row>
<row>
<hbox>

View file

@ -126,7 +126,7 @@
</detailrow>
<textbox value="@{configurationUnit.name}"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
constraint="no empty:${i18n:_('cannot be empty')}" />
<textbox value="@{configurationUnit.alpha}"
constraint="no zero,no empty,/[0-9][0-9]*(\.[0-9][0-9]?)?/:${i18n:_('must be a real positive number')}" />
<button sclass="icono" image="/common/img/ico_borrar1.png"

View file

@ -50,7 +50,7 @@
<label value="${i18n:_('Code')}" />
<hbox>
<textbox width="350px" value="@{controller.worker.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.worker.codeAutogenerated}" />
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"

View file

@ -31,7 +31,7 @@
<row>
<label value="${i18n:_('Name')}" />
<textbox value="@{controller.scenario.name}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.scenario.predefined}"
onBlur="controller.updateWindowTitle()" />
</row>

View file

@ -36,7 +36,7 @@
<rows>
<row self="@{each='assignedMaterial'}" value="@{assignedMaterial}">
<textbox value="@{assignedMaterial.material.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
readonly="true" />
<doublebox value="@{assignedMaterial.units}"
onChange="assignedMaterialsController.updateTotalPrice(self.parent)" />

View file

@ -41,7 +41,7 @@
<hbox>
<textbox id="code"
value="@{controller.typeOfWorkHours.code}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.typeOfWorkHours.codeAutogenerated}" />
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"
@ -52,13 +52,13 @@
<label value="${i18n:_('Name')}" />
<textbox id="name"
value="@{controller.typeOfWorkHours.name}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()" />
</row>
<row>
<label value="${i18n:_('Default price')}" />
<decimalbox id="defaultPrice"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
value="@{controller.typeOfWorkHours.defaultPrice}" width="300px"
format="@{controller.moneyFormat}" />
</row>

View file

@ -47,7 +47,7 @@
<label value="${i18n:_('Username')}" />
<textbox id="loginName"
value="@{controller.user.loginName}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
onBlur="controller.updateWindowTitle()"
disabled="@{controller.ldapUserOrDefaultAdmin}" />
</row>

View file

@ -158,7 +158,7 @@
<label value="${i18n:_('Code')}" />
<hbox>
<textbox width="350px" value="@{controller.workReport.code}"
constraint="no empty:${i18n:_('cannot be null or empty')}"
constraint="no empty:${i18n:_('cannot be empty')}"
disabled="@{controller.workReport.codeAutogenerated}" />
<checkbox id="generateCode" label="${i18n:_('Generate code')}"
onCheck="controller.onCheckGenerateCode(event)"

View file

@ -134,8 +134,8 @@ function materialSaveValidation(){
}
function materialEmptyFieldValidation(){
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
}
function materialWithoutCategoryValidation(){

View file

@ -114,8 +114,8 @@ function commonSaveConfigurationValidation(){
}
function commonEmptyCodeValidation(){
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
}
function commonProjectPlanningFilterValidation(){

View file

@ -50,8 +50,8 @@ function exceptDayCreateDuplicateName($name, $standar, $color) {
function exceptDayCreateEmpty($name, $standar, $color) {
commonCreate("Exception Days");
exceptDayForm($name, $standar, $color);
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
_log("Do not allow create an exception day without name", "custom1");
}

View file

@ -49,8 +49,8 @@ function labelCreateDuplicateType($type){
function labelCreateEmpty(){
commonCreate("Labels");
commonLabelForm("");
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
_log("Do not allow create a label without type", "custom1");
}

View file

@ -59,8 +59,8 @@ function workHourCreateDuplicateType($type, $price){
function workHourCreateEmpty(){
commonCreate("Work Hours");
commonWorkHourForm("", 10);
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
_log("Do not allow create a empty Work Hour", "custom1");
}

View file

@ -68,8 +68,8 @@ function companyDuplicatedId(){
}
function companyEmptyField(){
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
}
/* test values */

View file

@ -174,13 +174,13 @@ function criteriaForm($name){
* */
function machineNameEmptyValidation(){
_assertExists(_div("Name cannot be null or empty"));
_assert(_isVisible(_div("Name cannot be null or empty")));
_assertExists(_div("Name cannot be empty"));
_assert(_isVisible(_div("Name cannot be empty")));
}
function machineDescriptionEmptyValidation(){
_assertExists(_div("Description cannot be null or empty"));
_assert(_isVisible(_div("Description cannot be null or empty")));
_assertExists(_div("Description cannot be empty"));
_assert(_isVisible(_div("Description cannot be empty")));
}
function machineEmptyFields(){

View file

@ -32,8 +32,8 @@ function profileCreateDuplicateType($name) {
function profileCreateEmpty() {
commonCreate("Profiles");
profileForm("");
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
_log("Do not allow create a Profile with empty Name", "custom1");
}

View file

@ -62,8 +62,8 @@ function accountsCreateDuplicateType($name, $password) {
function accountsCreateEmpty($name, $password) {
commonCreate("Accounts");
accountsForm($name, $password);
_assertExists(_div("cannot be null or empty"));
_assert(_isVisible(_div("cannot be null or empty")));
_assertExists(_div("cannot be empty"));
_assert(_isVisible(_div("cannot be empty")));
_log("Do not allow create a Account with empty Name", "custom1");
}