farmOS translation (i18n)

Hello farmOS devs! I’m interested in the farmOS and I come from a family of coffee farmers. I presented few videos and they seem to be interested. I see that farmOS doesn’t have modules or info covering coffee specifics, so I am interested to see how I can collaborate and I also want to translate to pt-BR as very few Brazilian workers in this area speak English.

Is anyone already working on i18n for the modules? If so, how can I help? If not, does anybody knows how can I start?

Any information is greatly appreciated. I am an experienced software engineer but never worked with Drupal before.

Thank you ! I am looking forward to collaborating to this great project.

5 Likes

Thanks for starting this post @tmoreira! There has been a lot of interest in translation since the beginning of farmOS. Because farmOS is built on Drupal, there are some good options for doing so already! Now we are in the process of coming up with some standard and recommended workflows around doing it. Also, we need translators!

Let me first point to this conversation on GitHub: https://github.com/farmOS/farmOS.org/issues/18

And the farmOS.org documentation page that was produced from that: https://farmos.org/hosting/localization/

That mainly covers how to download and enable translations, but we need more instructions on how to contribute translations. Although a lot of this is already documented in a general way on https://localize.drupal.org, which is where our translations would be hosted.

Hello Folks! Im also interested in translating farmOS to Pt_BR: you can count on me @tmoreira

The instructions are to create a git hub issue, right?

[]'s

1 Like

Hi,

I’m trying to get farmos in German language, but I’m stumbling over serveral problems.
I have installed the modules (locale and l10_update) as discussed in this github issue https://github.com/farmOS/farmOS.org/issues/18
I was then able to download a German translation to my farmos. However a lot of strings are still not translated.
Now I’m trying to figure out how to provide my translations.
There are serveral observations I have made so far:

  1. String seems to be translated, but showing English term in the web interface
    Example: on /log/add?destination=farm the various types of logs are listed - all in English. e.g. “Harvest”
    If I search for “Harvest” on admin/config/regional/translate/translate I get some results. The first one appears to be
    the one I’m looking for. If I click on edit, I can see that it has a German translation.
    Why is this translation not applied? Is this the wrong string? If yes, which one is the correct “Harvest” string?
  2. String appears in English language, but can not be found on localize.drupal.org
    Example: on /log/add?destination=farm above the log types farmos shows the instruction “Select a type of log to create.”
    Now I’m searching for “Select a type” on https://localize.drupal.org/translate/languages/de/translate?project=farm&status=0&release=all&search=Select%20a%20type%20of%20&author&context=all&limit=10&sid=0
    in order to provide a translation, but I do not get the result for “Select a type of log to create.”
    Strange: on my local farmos translation page admin/config/regional/translate/translate I do find an entry.
  3. Different translations for the same term
    Example: On /farm/assets/plantings the translation for “Plantings” is “Plfanzungen” (it has a typo, but it is more or less the correct term).
    On the same page the button for “Add planting” is translated with “Add Kultur”. “Kultur” is a better translation for “Planting”, but why does
    the German translation contain the English word “Add”? Searching for “Add kultur” on admin/config/regional/translate/translate reveals that
    there is an entry for “Add kultur” that does not have a German translation… very strange.
  4. String cannot be found in translate page
    Example: On farm/logs/all there is a Filter/Sort section. This is written in English as “Filter/Sort”.
    I try to provide a German translation, but if I check admin/config/regional/translate/translate I don’t find the
    right entry.

    Can anybody explain these observaton and provide help? I feel like I’m doing something wrong the translations but I cannot figure out what.
    Thank you!

Thanks for jumping in and giving this a try @PDorfFarm!

I’m not sure what the exact causes are of the specific issues you encountered, but I’m sure with a little digging we can figure it out. It will probably be a process of looking for those strings in the code as well, to understand where and how they are being created. In Drupal, translatable strings must all be wrapped in the t() function. This is what makes them show up on localize.drupal.org, from what I understand.

We may need some help from someone who has more experience with the Drupal 7 localization process. I would love to see someone step forward to help steward this process in both Drupal 7 and Drupal 8 (which will hopefully be easier, because a lot of these systems are in Drupal 8 core now, and are much more mature).

Hello
I’m Enrico Gabrielli from Italy.
I have now translated 50% of FARMOS into Italian from https://localize.drupal.org/translate/languages/it/translate?project=farm.
But now the problem arises: the moderators seem not very active: there were already suggestions of at least 6 months never approved.
The problem is that with my new account I can’t write posts to other team members!
Stay health :mask:

1 Like

Wow great work @bonushenricus! That’s disappointing that the moderators are not responsive to merging those changes though. I wonder what options we have there. That could be a problem.

I know that it’s also possible to manually download and share translations as files, I believe… which would bypass the moderation process, but would also be more to manage in general (it’s nice to have it automated through localize.drupal.org).

The problem is that with my new account I can’t write posts to other team members!

I wonder if you need to be “confirmed” since it’s a new account? I might be able to do that if you tell me your drupal.org username.

Ciao!
Hi @mstenta, I replied about my personal account in drupal.org only to you by email

Another topic about translations: I see that in github there is also the code of the farmos.org site in mkdocs.
So to make the documentation in Italian would you recommend making a clone and translating it into Italian?

1 Like

Great question regarding farmOS.org - we don’t currently have a procedure for managing translations of that. That would be worth figuring out.

Worth noting, @jgaehring is starting an initiative to move the website from Mkdocs to a more customized Gatsby.js codebase: https://github.com/farmOS/farmOS.org/issues/76

It would be good to mention translations in that issue, but it is also probably worth opening a dedicated issue to discuss it in the farmOS.org issue queue: https://github.com/farmOS/farmOS.org/issues

In the meantime, if you want to fork and translate yourself in a branch, that would allow you to get up and running quickly, and hopefully we could find a way to merge those efforts in the future.

The challenge will always be keeping translations in sync as changes are made, but that’s a bigger discussion. Thanks for bringing it up.

As far as the Gatsby rewrite is concerned, I believe that it is independent of any decisions you make regarding translations. However you decide to set up translations in mkdocs, Gatsby should be able to accommodate when the time comes, so I suggest starting a separate issue to track this.

1 Like

Today morning I wrote:

Hello
Drupal Italian Team gave me permissions on localize.drupal.
So I continued to translate from a simple .po file, but it’s too complicated, and I struggle to understand what, where and how the result of my translations is.
So yesterday I decided: I installed FarmOS locally, and then I tried to install the l10n_client module.
Having FarmOS locally, I simply brought l10n_client into modules. I activated it and the button turned green. In configuration, if enabled “Enable sharing translations with server” tells me that I don’t have permissions. But in user I don’t find where to insert the API Key!
And in user permissions I don’t find blocking of client localization.

Today afternoon:

Then update: there was some problem with the permissions of some directory of configuration. Resolved. Restarted apache.
Now I see the permissions of l10n_client, but the module cannot be activated: the button remains orange if I click it on. Do I have to ask in drupal.org? Is there anyone who has already done all this?
Is there any conflict between l10n_client and some FarmOS modules?
Thanks

Today evening:

Last update: I installed “l10n_client 7.x-1.3” but it has 2 bugs. The correct version is “l10n_client 7.x-1.x-dev”! It runs!
But I don’t find the field of “API Key” in a user settings!
Thank

Ok guys: database update: all right !! Now I start to work seriously on the translation!

1 Like

Oh so glad you figured it all out @bonushenricus! If you have a chance to document the steps you took to get up and running, I’m sure that others would find it useful!

Perhaps we could even expand https://farmos.org/hosting/localization/ to have a section focused on contributing translations. Right now it only explains how to download and enable translations.

Hello @bonushenricus,

I am also trying to translate FarmOS in French and I have the same issue with the l10n_client module. How did you manage to get the API Key field in user settings ?

Thanks @bonushenricus but my issue is to get the field for this API key in the user settings.
Currently, I don’t know how to link this key with the localization client module :frowning:

Edit: In your previous post you spoke about a database update. What did you do exactly ?

Sorry
in fact it’s true you do everything from the server
On the “profile - modify” there will be a block “Localization client” with the link to have the key and a space to write it!
When updating the module with the version without bugs “l10n_client 7.x-1.x-dev” in the modules there should be a problem and the link to solve it
this refers you to a database update to correctly configure “l10n_client 7.x-1.x-dev”!
It turned out to be quite automatic!
Good luck

iam also stumbling over that problem at the moment, like @PDorfFarm has shown some month ago.

At first i thought it has something to do with the modules and missing t(), like you sad @mstenta.

So i looked into the code and tried to prove that, but what i found made me even more confused :confused:

I looked into the add Log input:
Some input fields are not translated here (Materials, Purpose, Application method, …) and all the helper text.
So at first i checked for the translation at the translation panel and found “Materials” translated.
Then i looked into the code and found in farm_log_input.module
'label' => t('Material'),
So it seems like the code is right, but the translation isnt working?

I can confirm “Harvest” string is not translated here:
/log/add?destination=farm
even when translation string has it translated. I think we could open an issue about it, couldn’t we?

1 Like

Yes let’s open a bug report for this! I’m sure there will be more of these little things we need to debug along the way, so feel free to open GitHub issues as they come up.

Hello All.
We have the same problem, we are translating farmOS to spanish with the drupal translation module but some texts that are translated dont change, they still appear in english.
Is there a way to change the english po file directly as a temporary solution?
Thanks

2 Likes

Thanks for reporting @deadcalf - I believe the next step is to open a bug report that details where this is occurring so we can fix it. Would you or @calbasi like to start that. Screenshots would help so it’s clear. Thanks!