Translations for the new installer


Hi :wave:

I know that it’s very early days, but I want to contribute translations to the new Ubuntu installer, but the contribution guide is way too technical for me :sweat_smile:
Is there anyone here that would be able to create a non-technical step by step guide (or a video) for this? I imagine this would be helpful for others too :relaxed:

https://github.com/canonical/ubuntu-desktop-installer/blob/main/CONTRIBUTING.md

Non-technical step by step guide for translating using flutter tools in github

  1. Create a github account and sign in if you haven’t already.
  2. Go to main branch and click the Fork button.
  3. Open your friendly terminal window and create a new folder to download the source code:

mkdir repos
cd repos
git clone https://github.com/username/ubuntu-desktop-installer

Note: replace username with your github username.

  1. Create your own branch to translate to:

cd ubuntu-desktop-installer/
git checkout -b spanish-translation

Note: change spanish-translation for whatever you like.

  1. Link your fork with upstream:

git remote add upstream https://github.com/canonical/ubuntu-desktop-installer

  1. Go inside the folder ubuntu-desktop-installer/packages/ubuntu_desktop_installer/lib/l10n/ and copy the file app_en.arb and rename it to app_XX.arb where XX is your language code e.g. “es” for spanish.

  2. Edit the contents of your newly created arb file. Modify this strings:

“@@locale”: “en”,

“languageName”: “English”,

Replace them with your lang code and name.

Continue translating next strings as usual:

“welcome”: “Translation for welcome goes here”,

  1. When you are done commit your changes into main branch:

git status
git add /packages/ubuntu_desktop_installer/lib/l10n/app_XX.arb
git commit -m “Update spanish translation”

Where Update spanish translation it’s a message so you can write whatever you like.
Note: replace XX with your actual lang code.

  1. Push your changes to main branch:

git push -u origin YourBranchName

Where Your Branch Name is the name of the branch you created. In my example is “spanish-translation”.

  1. Go back to https://github.com/canonical/ubuntu-desktop-installer and click Compare & pull request button.

  2. Click Create pull request button and wait for your translation to be included.

5 Likes

git commit m “Update spanish translation

give an errror?

Why the question mark? Either it gives you an error (and in this case, please provide also the entire error message) or not.

I guess, you invoked

git commit m "Test for commit message"

which is wrong. Either use

git commit -m "Test for commit message"
# or maybe better to understand and learn the commands and options
git commit --message "Test for commit message"

But because the commit message is also an important part of the commit, I recommend you to invoke it directly with

git commit

which will open your editor and you can add a multiline commit message.

Please check, that

git config core.editor

is set to your preferred editor.

If you prefer “Gedit”, you can set it

# only for the current git repository
git config core.editor "gedit"
# or set it globally for all repositories
git config --global core.editor "gedit"
1 Like

Make sure you sign the CLA before sending your contribution.

1 Like