You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This document relates to Grouper 1.6 and internationalization.  Note,

Note, my environment is windows, mysql, tomcat.

Code changes

In 1.6.3, I made these changes.  Note, these are committed to the 1.6 branch (post 1.6.3), and are in 2.0.0+ as well.

edu.internet2.middleware.grouper.ui.util.HttpContentType.java

FROM:

  TEXT_XML("text/xml"),
 
  /** text html content type */
  TEXT_HTML("text/html"),
 
  /** application json content type */
  APPLICATION_JSON("application/json"),

TO:

  TEXT_XML("text/xml;charset=utf-8"),
 
  /** text html content type */
  TEXT_HTML("text/html"),
 
  /** application json content type */
  APPLICATION_JSON("application/json;charset=utf-8"),

Insert some subjects in the DB/LDAP (if you dont already have some in an existing source, note, you need the default source enabled if you use this sql):

insert into subject (subjectId, subjectTypeId, name) values ("joñ", "person", "joñ");

insert into subjectattribute (subjectId, name, value, searchValue) values ("joñ", "description", "Joñ", "joñ");
insert into subjectattribute (subjectId, name, value, searchValue) values ("joñ", "loginid", "joñ", "joñ");
insert into subjectattribute (subjectId, name, value, searchValue) values ("joñ", "name", "Joñ", "joñ");
commit;

grouper/media.properties:

 ###################################
 ## Internationalization
 ###################################

 # this should be true unless troubleshooting...
 convertInputToUtf8 = true

edu.internet2.middleware.grouper.j2ee.GrouperRequestWrapper:

FROM:

  public String getParameter(String name) {
 
    if (!this.multipart) {
      
      return this.wrapped.getParameter(name);
    }
 
    Object objectSubmitted = this.parameterMap.get(name);


TO:

  public String getParameter(String name) {
 
    if (!this.multipart) {
      String param = this.wrapped.getParameter(name);
      if (param != null && StringUtils.equals("GET", this.getMethod()) && TagUtils.mediaResourceBoolean("convertInputToUtf8", true)) {
        try {
          byte[] bytes = param.getBytes("ISO-8859-1");
          param = new String(bytes, "UTF-8");
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
      return param;
    }
 
    Object objectSubmitted = this.parameterMap.get(name);

edu.internet2.middleware.grouper.ui.GrouperUiFilter:

FROM:

   public void doFilter(ServletRequest servletRequest, ServletResponse response,
       FilterChain filterChain) throws IOException, ServletException {

     GrouperRequestWrapper httpServletRequest = null;
    
     try {
      
       httpServletRequest = new GrouperRequestWrapper((HttpServletRequest) servletRequest);


 TO:

   public void doFilter(ServletRequest servletRequest, ServletResponse response,
       FilterChain filterChain) throws IOException, ServletException {

     GrouperRequestWrapper httpServletRequest = null;
    
     try {
      
       servletRequest.setCharacterEncoding("UTF-8");
      
       httpServletRequest = new GrouperRequestWrapper((HttpServletRequest) servletRequest);


sdf

Text on admin UI

custom/nav.properties

groups.action.show-summary=Group summáry

Looks like this on Group screen:



Text on Lite UI

Set this on custom/media.properties

ui-lite.link-from-admin-ui = true

login.ui-lite.show-link = true

custom/nav.properties

simpleMembershipUpdate.updateTitle=Group mêmbership update lite


Tooltip on the lite UI

custom/nav.properties

 tooltipTargetted.simpleMembershipUpdate.viewInAdminUi=Switçh to the Admin UI for a more complete set of features


Menu item lite

custom/nav.properties

simpleMembershipUpdate.advancedMenuShowMemberFilter=Séarch for member


Menu tooltip lite

custom/nav.properties

simpleMembershipUpdate.advancedMenuShowMemberFilterTooltip=Sèlecting this option will show a search box above the membership list where you can search for members in this group


Lite combo and submitting



sdf

  • No labels