This method does not allow for [Previous] and [Next] to be translated.
|
Administrator
|
I made this patch but I did not find a way to test it (tried many, then ran out of time)
Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java =================================================================== --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 686461) +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy) @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -32,6 +33,7 @@ import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.collections.FlexibleMapAccessor; @@ -332,8 +334,9 @@ linkText += "VIEW_SIZE=" + viewSize + "&VIEW_INDEX=" + (viewIndex - 1) + "\""; // make the link - writer.append(rh.makeLink(request, response, linkText, false, false, false)); - writer.append(" class=\"buttontext\">[Previous]</a>\n"); + writer.append(rh.makeLink(request, response, linkText, false, false, false)); + String previous = UtilProperties.getMessage("CommonUiLabels", "CommonPrevious", (Locale) context.get("locale")); + writer.append(" class=\"buttontext\">[" + previous +"]</a>\n"); } if (listSize > 0) { @@ -348,7 +351,8 @@ // make the link writer.append(rh.makeLink(request, response, linkText, false, false, false)); - writer.append(" class=\"buttontext\">[Next]</a>\n"); + String next = UtilProperties.getMessage("CommonUiLabels", "CommonNext", (Locale) context.get("locale")); + writer.append(" class=\"buttontext\">[" + next +"]</a>\n"); } writer.append(" </b>\n"); FWIW Jacques From: "Adam Heath" <[hidden email]> > This method does not allow for [Previous] and [Next] to be translated. > |
Administrator
|
In reply to this post by Adam Heath-2
I finally applied the patch in r686591 (forgot to mention)
Jacques From: "Jacques Le Roux" <[hidden email]> >I made this patch but I did not find a way to test it (tried many, then ran out of time) > > Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > =================================================================== > --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 686461) > +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy) > @@ -23,6 +23,7 @@ > import java.util.Arrays; > import java.util.Iterator; > import java.util.List; > +import java.util.Locale; > import java.util.Map; > import java.util.Set; > > @@ -32,6 +33,7 @@ > > import org.ofbiz.base.util.Debug; > import org.ofbiz.base.util.GeneralException; > +import org.ofbiz.base.util.UtilProperties; > import org.ofbiz.base.util.UtilValidate; > import org.ofbiz.base.util.UtilXml; > import org.ofbiz.base.util.collections.FlexibleMapAccessor; > @@ -332,8 +334,9 @@ > linkText += "VIEW_SIZE=" + viewSize + "&VIEW_INDEX=" + (viewIndex - 1) + "\""; > > // make the link > - writer.append(rh.makeLink(request, response, linkText, false, false, false)); > - writer.append(" class=\"buttontext\">[Previous]</a>\n"); > + writer.append(rh.makeLink(request, response, linkText, false, false, false)); > + String previous = UtilProperties.getMessage("CommonUiLabels", "CommonPrevious", (Locale) context.get("locale")); > + writer.append(" class=\"buttontext\">[" + previous +"]</a>\n"); > > } > if (listSize > 0) { > @@ -348,7 +351,8 @@ > > // make the link > writer.append(rh.makeLink(request, response, linkText, false, false, false)); > - writer.append(" class=\"buttontext\">[Next]</a>\n"); > + String next = UtilProperties.getMessage("CommonUiLabels", "CommonNext", (Locale) context.get("locale")); > + writer.append(" class=\"buttontext\">[" + next +"]</a>\n"); > > } > writer.append(" </b>\n"); > > FWIW > > Jacques > > From: "Adam Heath" <[hidden email]> >> This method does not allow for [Previous] and [Next] to be translated. >> |
In reply to this post by Jacques Le Roux
On Sat, 2008-08-16 at 21:31 +0200, Jacques Le Roux wrote:
> I made this patch but I did not find a way to test it (tried many, then ran out of time) > Jacques, I test it in party manager -> fin accounts. It work. You may add also this: Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java =================================================================== --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 687614) +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy) @@ -340,7 +340,8 @@ } if (listSize > 0) { - writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " of " + listSize + "</span> \n"); + String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale")); + writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " + listSize + "</span> \n"); } if (highIndex < listSize) { writer.append(" <a href=\""); Bilgin |
Administrator
|
Hi Bilgin,
I tried to re-create your patch (truncated in multi-lines in email) but failed. Could you please create a Jira issue or send it with a larger email width ? I personnlaly use the larger I can : 132 char. Thanks Jacques From: "Bilgin Ibryam" <[hidden email]> > On Sat, 2008-08-16 at 21:31 +0200, Jacques Le Roux wrote: >> I made this patch but I did not find a way to test it (tried many, then ran out of time) >> > Jacques, I test it in party manager -> fin accounts. It work. > You may add also this: > > Index: > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > =================================================================== > --- > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > (revision 687614) > +++ > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > (working copy) > @@ -340,7 +340,8 @@ > > } > if (listSize > 0) { > - writer.append(" <span class=\"tabletext\">" + > (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " of " + listSize > + "</span> \n"); > + String ofLabel = > UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) > context.get("locale")); > + writer.append(" <span class=\"tabletext\">" + (lowIndex + > 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " + listSize > + "</span> \n"); > } > if (highIndex < listSize) { > writer.append(" <a href=\""); > > > > Bilgin > |
Administrator
|
In reply to this post by Bilgin Ibryam
Thanks Bilgin,
Completed: At revision: 687675 (from your last one with larger email width) Jacques From: "Bilgin Ibryam" <[hidden email]> > On Sat, 2008-08-16 at 21:31 +0200, Jacques Le Roux wrote: >> I made this patch but I did not find a way to test it (tried many, then ran out of time) >> > Jacques, I test it in party manager -> fin accounts. It work. > You may add also this: > > Index: > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > =================================================================== > --- > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > (revision 687614) > +++ > framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java > (working copy) > @@ -340,7 +340,8 @@ > > } > if (listSize > 0) { > - writer.append(" <span class=\"tabletext\">" + > (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " of " + listSize > + "</span> \n"); > + String ofLabel = > UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) > context.get("locale")); > + writer.append(" <span class=\"tabletext\">" + (lowIndex + > 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " + listSize > + "</span> \n"); > } > if (highIndex < listSize) { > writer.append(" <a href=\""); > > > > Bilgin > |
Free forum by Nabble | Edit this page |