Dears, I was just about to update a translation in System Settings Doctype but was not able to find the translation *.csv in the frappe/frappe repo as I was used to.
Please let me know where and how I can add translations to the core. Thank you.
Hereās the PR that introduced this, with further info in the description:
If you find it more comfortable to translate directly in the ERPNext/Frappe UI, thereās In-Context Translation. In order to use this, you have to enable the Language āIn-Context Translationā / āeoā, select this for your current user and use the modal to log into your Crowdin account.
@rmeyer Would this work for .tsx files (React apps) as well? Iāve added translation functions in my React app, but Iām not sure if the PO files will get generated for those strings. They are wrapped as __(āStringā) in the app.
As today you and others using in Hungarian language, if ever want, is almost all my work, I just want to keep it updated.
Is it possible to add Hungarian and put me editor + approval ?
Yes, in principle strings can be extracted from any file type. Check frappeās babel_extractors.csv, which maps file paths to extractor functions. Youāll have to add one for .tsx. This can either be a real .tsx parser or you can use the existing pattern matcher for html-like templates (Jinja, JS Microtemplates).
So, for example, youād create [app]/babel_extractors.csv and add the following line:
This has some limitations compared to a real parser: backticks as quotes, the context parameter and translation statements formatted over multiple lines might not work as expected.
Hey guys, believe it or not, this might be one of the most critical things to get right with frappe / erpnext, specially in the website / frontend part.
Iām still wondering how can we translate the following in a webshop:
Categories
Attributes
Variants
Products / Items
Prev & Next ( Switch Page Buttons )
Are there any solutions yet for dynamic variables?
How can I keep my custom translations when upgrading? For example, it is essential to retain the translations I have completed when translations on Crowdin have not been merged in a timely manner or when there is a need for personalization.
IĀ“m checking the translation and most of the time it works quite fine. However I have some problems and you may help me with an answer.
I have a Table Docfield in the webform but the āAdd Rowā, āNo.ā, ā¦ are not translated. I already checked the de.po file but itĀ“s not working somehow. I already tried a custom solution with translation doctype, but this does not work at all (maybe wrong format).
I have tried to narrow down the problem and find the cause. Unfortunately, I have not been 100% successful, but here are my findings so far: General:
Translations usually work without problems
With Web Forms, however, there are isolated problems
Translations in Web Forms, which are standard fields or controls, have problems (but not, for example, the main action buttons such as Discard)
Frontend console
frappe._message provides a complete list of all translations in the desk view
frappe._message only provides a very limited selection of translations in the Web Form view. These are only the superficial elements, but not nested elements such as grid controls or the calendar.
Since (I assume) the translation in the frontend is based on frappe._messages, there is probably a problem here
Backend:
Here I am slowly despairing of finding the causes. I only have a rough guess
According to my idea, a possibility should be created in load_translations in frappe/website/doctype/web_form/web_form.py that the fieldtypes are checked and, if necessary, if text is available, these are also added to the translation in messages=.
But what really surprises me: why is it only now coming to light if the commit is from 2023? So Iām very unsure whether itās a local problem for me or something more general. I have also found very few reports of problems on Github and here in the forum.
However, here are two other posts with possibly similar problems:
@rmeyer I hope I havenāt misinterpreted anything here, Iām just looking for a solution to my problem.
Thank you very much for the response! I did not find this github issue IĀ“m not familiar with contributing to big projects like frappe, but I will check if I can add maybe something. Thank you very much!
Right now I cant post an issue on frappe github because it seems there was a lot of spam and is now temporarily closed. I will try to post it soon and make my first Pull Request ever