de.sstoehr.pustefix.i18n.model.MessageTranslation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pustefix-i18n-maven-plugin Show documentation
Show all versions of pustefix-i18n-maven-plugin Show documentation
A maven plugin to work with PO translation files with Pustefix framework
package de.sstoehr.pustefix.i18n.model;
public class MessageTranslation {
private final Locale locale;
private final String translation;
public MessageTranslation(Locale locale, String translation) {
if (locale == null || translation == null) {
throw new IllegalArgumentException("locale and translation have to be specified");
}
this.locale = locale;
this.translation = translation;
}
public Locale getLocale() {
return locale;
}
public String getTranslation() {
return translation;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MessageTranslation that = (MessageTranslation) o;
if (!locale.equals(that.locale)) {
return false;
}
if (!translation.equals(that.translation)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = locale.hashCode();
result = 31 * result + translation.hashCode();
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy