[CONF] Apache Syncope > Adding new language to admin console UI

2016-03-22 Thread Francesco Chicchiricco (Confluence)
Title: Message Title



 
 
 
 
 
 
 

Francesco Chicchiricco edited a page 
 
 
  
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Adding new language to admin console UI 
 
 
  
 
 
 
 
 
 
 
 
 
 
 Note 
 
 
 
 
 
 
 
 
title 
Version warning 
 
 
  
 
 
 
 
  Content of this page applies to Apache Syncope >= 2.0.X   
 
 
 Let's take an example: consider that you want to add support for French language in the admin console UI. ...  Get sources   Checkout   ...   project sources from ASF GIT   ... 
 
 See here  
 ...  or fork the GitHub mirror.   Initial build   From inside the directory where you have checked out the sources:  
 
 
 
 Code Block 
 
 
 
 
 $ mvn -PskipTests,all

  
 
 
  Add support   ...  for new Locale   Change the following in client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java from 
 
 
 
 Code Block 
 
 
 
 
 
 
 
 
language 
java 
 
 
  
 
 
 
 
 
   public static final List SUPPORTED_LOCALES = Collections.unmodifiableList(Arrays.asList(
new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR")
}));

  
 
 
 to 
 
 
 
 Code Block 
 
 
 
 
 
 
 
 
language 
java 
 
 
  
 
 
 
 
 public static final List SUPPORTED_LOCALES = Collections.unmodifiableList(Arrays.asList(
new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR"), Locale.FRENCH
}));

  
 
 
 
 
 
 
 Note 
 
 
 
 
 If your language is not in the default Java set of locale constants, it is possible to add it as shown below above for Brazilian Portuguese, for example:.  
 
 
 
 Code Block 
 
 
 
 
 
 
 
 
language 
java 
 
 
  
 
 
 
 
 
public static final List SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR")});

  
 
 
  
 
 
  Add actual translations  The admin console is a plain Apache Wicket web application, empowering Wicket's i18n support: see all details about this mechanism. Basically, for each *_it.properties file found under consoleclient/onsole/src/main/resources/org/apache/syncope/console/  
 
copy it in the same place by adding _fr to file name (for example, copy SyncopeApplicationSyncopeConsoleApplication.properties into SyncopeApplicationSyncopeConsoleApplication_fr.properties, or using another example, for Portuguese translations for each *_it.properties file found under client/console/src/main/resources/org/apache/syncope/console/, copy it in the same place by adding _pt_BR to file name (for example, copy SyncopeApplicationSyncopeConsoleApplication.properties into SyncopeApplicationSyncopeConsoleApplication_pt_BR.properties  
edit the newly added files by translating all messages to French or to corresponding language. 
  Check the (partial) result  In order to check if you are doing well, from inside the directory where you have checked out the sources: 
 
 
 
 Code Block 
 
 
 
 
 $ cd fit/console-reference
$ mvn -Pdebug  
 
 
  or, better, if you have JRebel configured:  
 
 
 
 Code Block 
 
 
 
 
 
$ cd fit/console-reference
$ export REBEL_HOME=/opt/jrebel # or wherever your JRebel installation is
$ mvn -Pjrebel
  
 
 
 You should now be able to browse the admin console at http://localhost:9080/syncope-console/, choose 'French' from the dropdown on the login form and see if the provided translation is working.  Finalize  Once done with latest two items above, you are ready to either commit your work (if you have rights) or file an issue on JIRA and attach a patch  thereor send a pull-request.  
 
 
  
 
 
 
 
 
 
 
 
 
 

View page
• 
 
 
 
 
 
 

Add comment
• 
 
 
 
 
 
 

Like 
 
 
  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
Stop watching space
• 
 
 
 
 
 
 
Manage notifications 
 
 
 
 
 
 
 
 
 
 
  
 
 
This message was sent by Atlassian Confluence 5.8.4  
 
 
  
 
 
 
 
 
 
 
 
 




[CONF] Apache Syncope Adding new language to admin console UI

2013-04-07 Thread confluence







Adding new language to admin console UI
Page edited by Bruno Rogerio de Moura


 Changes (1)
 




...
Basically, for each {{*_it.properties}} file found under {{console/src/main/resources/org/apache/syncope/console/}}  * copy it in the same place by adding {{_fr}} to file name (for example, copy {{SyncopeApplication.properties}} into {{SyncopeApplication_fr.properties}}, or using another example, for Portuguese translations for each {{*_it.properties}} file found under {{console/src/main/resources/org/apache/syncope/console/}}, copy it in the same place by adding {{_pt_BR}} to file name (for example, copy {{SyncopeApplication.properties}} into {{SyncopeApplication_pt_BR.properties}} 
* edit the newly added files by translating all messages to French or to corresponding language 
 h3. Check the (partial) result 
...


Full Content

Let's take an example: consider that you want to add support for French language in the admin console UI.

Sample workflow

Checkout fresh copy from SVN


	trunk
	1_0_X



Local build and installation

From inside the directory where you have checked out the sources:


$ mvn -PskipTests



Add support in the Java code

You need to change the following List in SyncopeSession (trunk / 1_0_X) from


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN});


to


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.FRENCH});



If your language is not in the default Java set of locale constants, it is possible to add it as shown below for Brazilian Portuguese, for example:



public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.forLanguageTag("pt-BR") });

  

Add actual translations

The admin console is a plain Apache Wicket web application, empowering Wicket's i18n support: see all details about this mechanism.

Basically, for each *_it.properties file found under console/src/main/resources/org/apache/syncope/console/

	copy it in the same place by adding _fr to file name (for example, copy SyncopeApplication.properties into SyncopeApplication_fr.properties, or using another example, for Portuguese translations for each *_it.properties file found under console/src/main/resources/org/apache/syncope/console/, copy it in the same place by adding _pt_BR to file name (for example, copy SyncopeApplication.properties into SyncopeApplication_pt_BR.properties
	edit the newly added files by translating all messages to French or to corresponding language



Check the (partial) result

In order to check if you are doing well, from inside the directory where you have checked out the sources:


$ cd console
$ mvn -Pdev



You should now be able to browse the admin console at http://localhost:9080/syncope-console/, choose 'French' from the dropdown on the login form and see if the provided translation is working.

Finalize

Once done with latest two items above, you are ready to either commit your work or file an issue on JIRA and attach a patch there.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Syncope Adding new language to admin console UI

2013-04-07 Thread confluence







Adding new language to admin console UI
Page edited by Bruno Rogerio de Moura


 Changes (1)
 




...
Basically, for each {{*_it.properties}} file found under {{console/src/main/resources/org/apache/syncope/console/}}  * copy it in the same place by adding {{_fr}} to file name (for example, copy {{SyncopeApplication.properties}} into {{SyncopeApplication_fr.properties}}, or using another example, for Portuguese translations for each {{*_it.properties}} file found under {{console/src/main/resources/org/apache/syncope/console/}}, copy it in the same place by adding {{_pt_BR}} to file name (for example, copy {{SyncopeApplication.properties}} into {{SyncopeApplication_pt_BR.properties}} 
* edit the newly added files by translating all messages to French or to corresponding language. 
 h3. Check the (partial) result 
...


Full Content

Let's take an example: consider that you want to add support for French language in the admin console UI.

Sample workflow

Checkout fresh copy from SVN


	trunk
	1_0_X



Local build and installation

From inside the directory where you have checked out the sources:


$ mvn -PskipTests



Add support in the Java code

You need to change the following List in SyncopeSession (trunk / 1_0_X) from


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN});


to


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.FRENCH});



If your language is not in the default Java set of locale constants, it is possible to add it as shown below for Brazilian Portuguese, for example:



public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.forLanguageTag("pt-BR") });

  

Add actual translations

The admin console is a plain Apache Wicket web application, empowering Wicket's i18n support: see all details about this mechanism.

Basically, for each *_it.properties file found under console/src/main/resources/org/apache/syncope/console/

	copy it in the same place by adding _fr to file name (for example, copy SyncopeApplication.properties into SyncopeApplication_fr.properties, or using another example, for Portuguese translations for each *_it.properties file found under console/src/main/resources/org/apache/syncope/console/, copy it in the same place by adding _pt_BR to file name (for example, copy SyncopeApplication.properties into SyncopeApplication_pt_BR.properties
	edit the newly added files by translating all messages to French or to corresponding language.



Check the (partial) result

In order to check if you are doing well, from inside the directory where you have checked out the sources:


$ cd console
$ mvn -Pdev



You should now be able to browse the admin console at http://localhost:9080/syncope-console/, choose 'French' from the dropdown on the login form and see if the provided translation is working.

Finalize

Once done with latest two items above, you are ready to either commit your work or file an issue on JIRA and attach a patch there.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Syncope Adding new language to admin console UI

2013-03-28 Thread confluence







Adding new language to admin console UI
Page edited by Bruno Rogerio de Moura


 Changes (1)
 




...
{code}  
If for your language isnt in the default java set of locale constants, its possible to add the language 
using locale language tag as is showed bellow, for example, to use Brazilian Portuguese language:  
...


Full Content

Let's take an example: consider that you want to add support for French language in the admin console UI.

Sample workflow

Checkout fresh copy from SVN


	trunk
	1_0_X



Local build and installation

From inside the directory where you have checked out the sources:


$ mvn -PskipTests



Add support in the Java code

You need to change the following List in SyncopeSession (trunk / 1_0_X) from


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN});


to


public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.FRENCH});



If your language isn't in the default java set of locale constants, it's possible to add the language 
using locale language tag as is showed bellow, for example, to use Brazilian Portuguese language:



public static final ListLocale SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, Locale.forLanguageTag("pt-BR") });

  

Add actual translations

The admin console is a plain Apache Wicket web application, empowering Wicket's i18n support: see all details about this mechanism.

Basically, for each *_it.properties file found under console/src/main/resources/org/apache/syncope/console/

	copy it in the same place by adding _fr to file name (for example, copy SyncopeApplication.properties into SyncopeApplication_fr.properties
	edit the newly added files by translating all messages to French



Check the (partial) result

In order to check if you are doing well, from inside the directory where you have checked out the sources:


$ cd console
$ mvn -Pdev



You should now be able to browse the admin console at http://localhost:9080/syncope-console/, choose 'French' from the dropdown on the login form and see if the provided translation is working.

Finalize

Once done with latest two items above, you are ready to either commit your work or file an issue on JIRA and attach a patch there.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment