Localization from English to Icelandic

I have just installed ErpNext for evaluation purposes.
Fundamental issue for us is translation.
I have looked at the translation directories and there is no English csv file.
How is the English csv file generated to get all the English statements for translation?
It would be great if someone could explain or direct to online documentation how this is done,
That is exporting English csv file and then importing back the translated file.
Thanks for your help

Read this:

https://frappe.github.io/frappe/user/en/guides/basics/translations

If you can raise an Issue in GitHub (https://github.com/frappe/erpnext/issues), we will add a Google translated version in the main repo

Thank you for your quick reply.
I have raised an issue at GitHub as you suggest.
I have also looked at the link you gave.
I am particularly looking at: “To find untranslated strings, run frappe --get_untranslated [lang] [path]”.
Could you please give an example of how I would run this command to extract for language is, especially the [lang] [path].

On another note it is important to keep in mind that Google Translate will not do the job for smaller languages.
It may work for the larger languages. I don’t know.
In our view a better approach (an approach we plan to use, and have used on Magento and other prjects) is to use a professional translation tool like OmegaT.
http://www.omegat.org/en/omegat.html
It is another Open Source project.
They already have filters and everything set up to do csv files.
They can also connect to the Google API.

@bjarni - we use Google Translate only to boostrap the translations.

We have also built a translation portal where community can contribute translations:

https://translate.erpnext.com/

I am going on a vacation next week. So will get this done on Thu / Fri. Unless someone else takes this up before…

best,
Rushabh

Thanks for your help
Bjarni

Why don’t you use .po style localisation standard ?

1 Like

@engbahaa2002 … seemed too verbose / complicated to maintain.

How do I update my ErpNext installation to get the bootstrapped translation on my server?

Updated this doc. See section 5

https://frappe.github.io/frappe/user/en/guides/basics/translations

Thank you for the update and help.
When I run the command:
bench frappe --get_untranslated is is.csv
The file is created with all the strings.
But when I open the file there is nothing separating the strings to be translated.
I was expecting a comma or “” enclosing the string to be translated.
Can I somehow specify this when I create the file using bench?

You have to import this list into Google / Bing and get another list of translated strings. Then you import both back into Frappe.

This is to make import / export easier

I have looked at Google translator toolkit.
Do I understand this correctly in order to translate ERPNext I have to use Google Translate?
Or after I import/export with Google and back into ERPNext the file will be available in the translation directory for further processing?
What if I import back without Google? Will the strings be separated in the imported file?
Is there any more complete documentation on this?
Or do you just want users to use Google only?

If someone else is thinking about translating ERPNext into their local language and not using Google
This is what I did from the command line
bench frappe --get_untranslated is /home/erp/en
bench frappe --get_untranslated is /home/erp/is
bench frappe --update_translations is /home/erp/en /home/erp/is
This creates 3 files in the following locations
apps/shopping_cart/shopping_cart/translations/is.csv
apps/erpnext/erpnext/translations/is.csv
apps/frappe/frappe/translations/is.csv
Took a copy of these 3 files
Opened them in LibreOffice
Copied column A and pasted to column B
Saved the file as csv, UTF8 and quoted all cells
I then used OmegaT to translate the main menu
Then took the translated file into LibreOffice and removed the quote from all cells and saved as csv again
Copied files back to server
Edited sites/languages.txt and /apps/frappe/frappe/data/languages.txt
bench start
Changed language in settings and main menu is now translated

2 Likes

@bjarni awesome :slight_smile: please share your translations via pull-request.

No we have no love for Google or anyone else - just use it too bootstrap a new language.

Please share OmegaT tips if you have.

OmegaT can be found here:
http://www.omegat.org/en/omegat.html
To download go here:
http://www.omegat.org/en/dl_overview.php
I chose Standard Version Windows without JRE
If Java is not installed then choose with JRE
After install run program
You are greeted with a help page. It is good reading.
Steps I took to translate the main menu of ErpNext
Options
File filters
Magento
Edit
Source File Encoding
UTF-8
OK
OK
Yes
Project
New
Folder name: ErpNext
Source files Language: EN-US
Translated files Language: IS
Everything else default
OK
Copy Files to Source Folder
Select the 3 files
Open
You will be placed at the first segment
Start translation

When finished
Project
Create Translated Documents

Open File Explorer
Go to Documents
There you will see ErpNext
Open ErpNext and you have source and target
Source contains the original files
Target contains the translated files you want to take back to the server.
Please see my earlier post on quoted text.

The process is this easy because OmegaT already knows how to deal with csv files. Magento another Open Source project uses csv files for translation like ErpNext. Because of Magento OmegaT has been configured for csv and automatically knows how to handle the fies.

If you have any TMX files for your language please place them in the tm directory.
Look around for others that might be willing to share with you TMX files.

OmegaT can connect to Google API

Happy translating

1 Like

@rmehta
maintain
= this is main task for the community, just need vanila en file for every released version. (keeping portal would be also nice : )

verbose

  • most of languages has different structure than english and current solution can’t cover them fully without touching vanilla code (erpnext), please correct me
  • add pls

You are correct and you have brought up a very important point.
In Icelandic declension is an issue.
ERPNext developers for example have used shortcuts in the text.
Here is an example:
New {0}: #{1}
New is used here in different context in the code, which is fine for English.
But in places this is not translatable in ERPNext when it comes to Icelandic and other languages.
Because New can be expressed in many different ways depending on the context of the sentence.
I wish I new the code better to suggest a solution.
Maybe insight from other open source projects could help?

That is the reason for the positional {0} {1}
So, if in your language, the second item comes before the first one, you can translate to “New {1}: {0}”

This is true but not what I am talking about.
For example the English word New is inserted many places in ERPNext.
An it is always New, which is fine in English.
In other languages New takes on many different forms depending on the context.
For example in Accounts/Documents/Sales invoice New would be translated “Nýr”
and in Stock/Documents/Item it would be translated “Ný”
And other variants are also possible depending on the context.
I think this is probably better explained here:
http://bin.arnastofnun.is/DMII/

How do other frameworks deal with this? Maybe the translation system should have variant support. So, if more specific translation is available for a fragment, it should use that. I don’t know how this would be implemented. Ideas are welcome :smile: