Skip to content

Commit

Permalink
Merge pull request #459 from ufal/issue_7
Browse files Browse the repository at this point in the history
i18n for lindat stuff (theme, js, java classes)
  • Loading branch information
kosarko committed Jan 11, 2016
2 parents ba0de2a + 227cb6d commit 407db0d
Show file tree
Hide file tree
Showing 36 changed files with 4,516 additions and 568 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ public class InvalidContinuationTransformer extends AbstractDSpaceTransformer im

private static final Message T_dspace_home =
message("xmlui.general.dspace_home");


private static final Message T_site_admin =
message("xmlui.error.site_administrator");

private static final Message T_here =
message("xmlui.general.here");


/** Where the body element is stored while we wait to see if it is empty */
private SAXEvent bodyEvent;
Expand Down Expand Up @@ -178,12 +184,12 @@ public void addBody(Body body) throws SAXException, WingException,
String login = contextPath+"/login";
Item item = list.addItem();
item.addHighlight("").addContent(T_head);
item.addXref(login, "here", "signon");
item.addXref(login, T_here, "signon");

String contact = contextPath+"/contact";
item = list.addItem();
item.addHighlight("").addContent(T_para1);
item.addXref(contact, "site administrator");
item.addXref(contact, T_site_admin);

list.addItem(null, "fa fa-warning fa-5x hangright").addContent(" ");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public class PiwikStatisticsTransformer extends AbstractDSpaceTransformer {

private static Logger log = Logger.getLogger(GAStatisticsTransformer.class);

private static final Message T_alredy_subscribed = message("PiwikStatisticsTransformer.already_subscribed");
private static final Message T_unsubscribe = message("PiwikStatisticsTransformer.unsubscribe");
private static final Message T_get_monthly = message("PiwikStatisticsTransformer.get_monthly");
private static final Message T_subscribe = message("PiwikStatisticsTransformer.subscribe");

private static final Message T_dspace_home = message("xmlui.general.dspace_home");
private static final Message T_head_title = message("xmlui.statistics.piwik.title");
private static final Message T_statistics_trail = message("xmlui.statistics.piwik.trail");
Expand Down Expand Up @@ -86,14 +91,14 @@ public void addBody(Body body) throws SAXException, WingException,
Division subscribe = division.addDivision("subscribe", "alert alert-success");
Para para = subscribe.addPara(null, "bold");
para.addHighlight("fa fa-envelope").addContent(" ");
para.addContent(" You are subscribed to receive a monthly report of this item via email ");
para.addXref("?subscribe=no", "Unsubscribe", "btn btn-xs btn-success pull-right bold", "");
para.addContent(T_alredy_subscribed);
para.addXref("?subscribe=no", T_unsubscribe, "btn btn-xs btn-success pull-right bold", "");
} else {
Division subscribe = division.addDivision("subscribe", "alert alert-warning");
Para para = subscribe.addPara(null, "bold");
para.addHighlight("fa fa-envelope").addContent(" ");
para.addContent(" Get a monthly report for this item via email ");
para.addXref("?subscribe=yes", "Subscribe", "btn btn-xs btn-warning pull-right bold", "");
para.addContent(T_get_monthly);
para.addXref("?subscribe=yes", T_subscribe, "btn btn-xs btn-warning pull-right bold", "");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ else if (inputType.equals("qualdrop_value"))
//Only display this field if we have a value to display
if (displayValue!=null && displayValue.length()>0)
{
reviewSection.addLabel(input.getLabel());
reviewSection.addLabel(message(input.getLabel()));
if (mam.isAuthorityControlled(value.schema, value.element, value.qualifier))
{
String confidence = (value.authority != null && value.authority.length() > 0) ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public class UFALLicenseStep extends LicenseStep {
protected static final Message T_license_not_supported = message("xmlui.Submission.submit.UFALLicenseStep.license_not_supported");
protected static final Message T_review_msg= message("xmlui.Submission.submit.UFALLicenseStep.review_no_file");
protected static final Message T_review_license_error= message("xmlui.Submission.submit.UFALLicenseStep.review_license_error");
protected static final Message T_license_select_placeholder= message("xmlui.Submission.submit.UFALLicenseStep.option_placeholder");
protected static final Message T_license_select_head= message("xmlui.Submission.submit.UFALLicenseStep.select_head");
protected static final Message T_select_or_label = message("xmlui.Submission.submit.UFALLicenseStep.or_label");


//
Expand Down Expand Up @@ -166,7 +169,7 @@ public List addBodySelectLicense(Body body) throws SAXException,
if (file_uploaded) {

form = controls.addList("submit-ufal-license", List.TYPE_FORM, "");
form.setHead("Select the resource license");
form.setHead(T_license_select_head);

Item selectorLink = form.addItem("", "alert alert-info");
selectorLink.addHighlight("").addContent(T_resource_license_text);
Expand All @@ -176,7 +179,7 @@ public List addBodySelectLicense(Body body) throws SAXException,
selectorLink.addXref("#!", T_license_selector_button, "btn btn-repository licenseselector bold btn-block btn-lg");

Item orLbl = form.addItem(null, "text-center");
orLbl.addContent("- OR -");
orLbl.addContent(T_select_or_label);

Item helpText2 = form.addItem();
helpText2.addHighlight("license-resource-text").addContent(T_resource_license_text2);
Expand Down Expand Up @@ -211,7 +214,7 @@ public List addBodySelectLicense(Body body) throws SAXException,
if(selected_license!=null && selected_license[0].equals("")) selected_license = null;
int selectedId = (selected_license != null && selected_license.length > 0) ? Integer.parseInt(selected_license[0]) : -1;

license_select.addOption(true, "", "Select a License ...");
license_select.addOption(true, "", T_license_select_placeholder);

for (LicenseDefinition license_def : license_defs) {
boolean selected = license_def.getLicenseId() == selectedId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
private static final Message T_no_results =
message("xmlui.ArtifactBrowser.AbstractSearch.no_results");

private static final Message T_head_no_items =
message("xmlui.ArtifactBrowser.AbstractSearch.head.no_items");

private static final Message T_all_of_dspace =
message("xmlui.ArtifactBrowser.AbstractSearch.all_of_dspace");

Expand Down Expand Up @@ -416,7 +419,7 @@ protected void buildSearchResultsDivision(Division search)
}

} else {
results.setHead("No items found");
results.setHead(T_head_no_items);
results.addPara(T_no_results);
}
//}// Empty query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class SimpleSearch extends AbstractSearch implements CacheableProcessingC
private static final Message T_filter_authority = message("xmlui.Discovery.SimpleSearch.filter.authority");
private static final Message T_filter_notauthority = message("xmlui.Discovery.SimpleSearch.filter.notauthority");
private static final Message T_did_you_mean = message("xmlui.Discovery.SimpleSearch.did_you_mean");
private static final Message T_filter_notavailable = message("xmlui.Discovery.SimpleSearch.filter.notavailable");

private SearchService searchService = null;

Expand Down Expand Up @@ -250,7 +251,7 @@ protected void addFilterRow(java.util.List<DiscoverySearchFilter> filterFields,
typeSelect.addOption(StringUtils.equals(relationalOperator, "notcontains"), "notcontains", T_filter_notcontain);
typeSelect.addOption(StringUtils.equals(relationalOperator, "notequals"), "notequals", T_filter_notequals);
//typeSelect.addOption(StringUtils.equals(relationalOperator, "notauthority"), "notauthority", T_filter_notauthority);
typeSelect.addOption(StringUtils.equals(relationalOperator, "notavailable"), "notavailable", "Not Available");
typeSelect.addOption(StringUtils.equals(relationalOperator, "notavailable"), "notavailable", T_filter_notavailable);



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ public class EditProfile extends AbstractDSpaceTransformer
private static final Message T_invalid_item =
message("xmlui.EPerson.EditProfile.invalid_item");

private static final Message T_signed_licenses =
message("xmlui.EPerson.EditProfile.signed_licenses");


//private static final Message T_head_identify =
// message("xmlui.EPerson.EditProfile.head_identify");
Expand Down Expand Up @@ -671,7 +674,7 @@ public void addBody(Body body) throws WingException, SQLException {
}

Division signed = profile.addDivision("signed-licenses", "well well-light");
signed.setHead("Licenses you signed");
signed.setHead(T_signed_licenses);
add_signed_licenses(signed);

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public class StatisticsTransformer extends AbstractDSpaceTransformer {
private static final String T_head_visits_countries = "xmlui.statistics.visits.countries";
private static final String T_head_visits_cities = "xmlui.statistics.visits.cities";
private static final String T_head_visits_bitstream = "xmlui.statistics.visits.bitstreams";

private static final Message T_most_viewed = message("homepage.most_viewed_items");
private static final String T_top_week = "homepage.top_week";

private Date dateStart = null;
private Date dateEnd = null;
Expand Down Expand Up @@ -138,7 +141,7 @@ public void renderHome(Body body) throws WingException {

Division home = body.addDivision("home", "primary repository");
Division division = home.addDivision("stats", "secondary stats");
division.setHead("Most Viewed Items");
division.setHead(T_most_viewed);
try {

/** List of the top 10 items for the entire repository Last week **/
Expand All @@ -151,7 +154,7 @@ public void renderHome(Body body) throws WingException {
cal.add(Calendar.WEEK_OF_MONTH, -1);
dateFilter.setStartDate(cal.getTime());
statListing.addFilter(dateFilter);
statListing.setTitle("Top Last Week");
statListing.setTitle(T_top_week);

//Adding a new generator for our top 10 items without a name length delimiter
DatasetDSpaceObjectGenerator dsoAxis = new DatasetDSpaceObjectGenerator();
Expand Down
Loading

0 comments on commit 407db0d

Please sign in to comment.