source code translation to Brazilian Portuguese

21 views
Skip to first unread message

Alceu Rodrigues de Freitas Junior

unread,
Feb 18, 2022, 9:58:42 AM2/18/22
to Jenkins Documentation
Greetings,

My name is Alceu and I would like to help translate Jenkins source code to Brazilian Portuguese.

Unfortunately, I'm a little lost about how this process is organized.

There is a Brazilian group of users (jenkinsci-br) that originally took care of this, but it seems the group is not active anymore (last message sent was May 2021). I also tried sending a message to this group, but after a week I'm still without an answer.

This is the link to the Brazilian docs about how to translate (in Brazilian Portuguese): https://wiki.jenkins.io/display/JENKINS/Brazilian+Portuguese+Translation. It leads to this another link (English) https://wiki.jenkins-ci.org/display/JENKINS/Building+Jenkins that describes how to download Jenkins code and compile it. These steps are not working due the error below and I believe they are actually outdated. This are a except from the stacktrace (tried even without any attempt to translate):

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.jenkins-ci.main:jenkins-bom:pom:2.335-SNAPSHOT in repo.jenkins-ci.org (https://repo.jenkins-ci.org/public/) @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 55, column 19
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.main:remoting:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 95, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:instance-identity:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 115, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 119, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:windows-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 123, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:launchd-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 127, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:upstart-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 131, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:systemd-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 135, column 17
[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-jdk14:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 139, column 17

Anyway, instructions are a bit different from what I had found at https://www.jenkins.io/doc/developer/internationalization/i18n-source-code/.

So, to summarize my issues to help:
  1. Not sure if the Brazilian group is still active or not;
  2. How to actually compile code with Maven after translating;
  3. Once the translation is good, how do I submit it to be published together with Jenkins distributions;
Thanks in advance,
Alceu



Mark Waite

unread,
Feb 18, 2022, 3:48:20 PM2/18/22
to Jenkins Documentation
Thanks so much for your willingness to provide Brazilian Portuguese translations for Jenkins.  We'd love to have them.  Answers are below

On Friday, February 18, 2022 at 7:58:42 AM UTC-7  Alceu  wrote:
Greetings,

My name is Alceu and I would like to help translate Jenkins source code to Brazilian Portuguese.

Unfortunately, I'm a little lost about how this process is organized.

There is a Brazilian group of users (jenkinsci-br) that originally took care of this, but it seems the group is not active anymore (last message sent was May 2021). I also tried sending a message to this group, but after a week I'm still without an answer.


I'm confident that means the group is not currently active.
 
This is the link to the Brazilian docs about how to translate (in Brazilian Portuguese): https://wiki.jenkins.io/display/JENKINS/Brazilian+Portuguese+Translation. It leads to this another link (English) https://wiki.jenkins-ci.org/display/JENKINS/Building+Jenkins that describes how to download Jenkins code and compile it. These steps are not working due the error below and I believe they are actually outdated. This are a except from the stacktrace (tried even without any attempt to translate):

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.jenkins-ci.main:jenkins-bom:pom:2.335-SNAPSHOT in repo.jenkins-ci.org (https://repo.jenkins-ci.org/public/) @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 55, column 19
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.main:remoting:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 95, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:instance-identity:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 115, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 119, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:windows-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 123, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:launchd-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 127, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:upstart-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 131, column 17
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.modules:systemd-slave-installer:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 135, column 17
[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-jdk14:jar is missing. @ org.jenkins-ci.main:jenkins-war:${revision}${changelist}, /home/semantix/Projects/jenkins/war/pom.xml, line 139, column 17


Be sure that you are compiling Jenkins core with either Java 8 or Java 11.  Other Java versions are not supported.  The Eclipse Adoptium project provides free Java 11 and Java 8 packages for Windows, AMD64 Linux, ARM64 Linux, ppc64le Linux, and s390x Linux.

Instructions to build Jenkins core from source are available in the CONTRIBUTING file of the Jenkins repository.

Once you've compiled Jenkins core successfully, you can submit pull requests to the Jenkins core repository with the translations.  Here are some examples of recent localization pull requests:


Anyway, instructions are a bit different from what I had found at https://www.jenkins.io/doc/developer/internationalization/i18n-source-code/.


The instructions on www.jenkins.io are the definitive ones.  If you find a mistake there, please submit an issue report ("Report a problem" at the bottom of the page) or a pull request ("Improve this page" at the bottom of the page) 
 
So, to summarize my issues to help:
  1. Not sure if the Brazilian group is still active or not;
Not active as far as I can tell.
  1. How to actually compile code with Maven after translating;

$ mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /home/mwaite/tools/apache-maven-3.8.4
Java version: 11.0.14, vendor: Eclipse Adoptium, runtime: /home/mwaite/tools/jdk-11.0.14+9
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.13.0-28-generic", arch: "amd64", family: "unix"
$ mvn -am -pl war,bom -DskipTests -Dspotbugs.skip -Dspotless.check.skip clean install

  1. Once the translation is good, how do I submit it to be published together with Jenkins distributions;

Submit a pull request to the Jenkins core repository.

Thanks!
Mark Waite
 
Thanks in advance,
Alceu



Alceu Rodrigues de Freitas Junior

unread,
Feb 19, 2022, 5:40:34 PM2/19/22
to jenkins...@googlegroups.com

Hello Mark,

Thanks for all the details.

I went through the process and it seems to be working after I installed a newer version of Maven (this computer is still running Ubuntu 18.04).

I started using the translation_tool.pl and it seems it is not working properly: for files that already exists in Brazilian Portuguese, new messages don't have the related English one. On the other hand that happens
for new files.

I started a review of the Perl script, and took the chance to try a first PR with a set of small changes: https://github.com/jenkinsci/jenkins/pull/6290. There is a lot of room to improve this script.

I'm considering rewrite this script with Python, so I can use this hack to translate the Unicode characters of Brazilian Portuguese to Java entities after initial translation, because copying and pasting from http://itpro.cz/juniconv/ is really boring, slow and prone to errors.

Please let me know if there is anything ready (or in progress) related to this tool.

Anyway, I already started translating the new files first, after that I should create a new PR.

Regards,

Alceu

Alceu Rodrigues de Freitas Junior

unread,
Feb 20, 2022, 12:58:58 PM2/20/22
to jenkins...@googlegroups.com
Greetings,

I've made some more research about translating the Jenkins source code
and the current tooling available for that.

The script translation-tool.pl considers converting UTF-8 files to
ASCII, but does do that in a proper way (in Perl code).

I think that this is because due the history of Java support to Unicode.
The deprecated Brazilian Portuguese instructions mentions the online
tool http://itpro.cz/juniconv/ to convert UTF-8 to Java entities. That's
not very practical.

Researching about a CLI tool, I found mentions to
https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/native2ascii.html,
but it seems it's usage was deprecated in newer versions of Java (and
OpenJDK).

I also found this link https://bugs.openjdk.java.net/browse/JDK-8074431
explaining the subject.

I was originally using Vim to edit the property files, but I considered
a shot with my old IntelliJ IDE, following the instructions at
https://www.jetbrains.com/help/idea/encoding.html#file-encoding-settings
and configured locally the jenkins-core code to be treated as ISO-8859-1
encoding. That took care of automatically converting the UTF-8
characters of Brazilian Portuguese to the appropriate Java entities.

It seems to me that this process generates the expected results, but
please let me know if it isn't. If it is acceptable, I would suggest to
add this information to the translation process documentation.

On the other hand, it seems to be that Jenkins should be able to support
reading those properties files in UTF-8 by default nowadays. Is that a
known issue?

Regards,

Alceu

Tim Jacomb

unread,
Feb 20, 2022, 3:21:51 PM2/20/22
to Jenkins Developers, jenkins...@googlegroups.com
Added dev mailing list to cc

--
You received this message because you are subscribed to the Google Groups "Jenkins Documentation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-doc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-docs/2bf9c31d-78c9-a74b-2dff-a8774ba2e1fd%40gmail.com.
Reply all
Reply to author
Forward
0 new messages