Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Translation / Localisation ] Words / Strings that need context #476

Open
SirSundays opened this issue Jan 7, 2022 · 13 comments
Open

[ Translation / Localisation ] Words / Strings that need context #476

SirSundays opened this issue Jan 7, 2022 · 13 comments

Comments

@SirSundays
Copy link
Contributor

This issue serves as a place to collect words and strings from farmOS that need context to be translated correctly.

The problem:
Some words can only be translated correctly if you know the context of them. Its described like this on the Drupal Website:

What is string context?

When translating Drupal’s user interface to other languages, each original (English) string can have only one translation. This is a problem when one English word has several meanings, like "Order", which can mean the order of elements in a list, to order something in a shop, or an order someone has placed in a shop. For many languages, the string "Order" needs a different translation for each of these meanings.

In Drupal 7. x and later, it is possible to make different versions of such strings for translation. This is done by adding text to make unique strings for each meaning. This extra text is called string context. ("Translation context" is also used.) It can also give useful information to the translators. It’s not shown to the end user, so for English versions of Drupal there’s no visible difference.

Because most of the words and strings in farmOS don´t have that context added to it (yet) we can now at least collect them all in here.
So if you find a word that needs context or you just know of one, please write it in this issue right here.

Information needed:

  1. The word itself.
  2. Where you found it (the module/subpage or something like that)
  3. The context of it

This will help to make farmOS easier to use in other languages.

@mstenta
Copy link
Member

mstenta commented Jan 10, 2022

Thanks for starting this @SirSundays! I will link to this from our drupal.org issue as well: https://www.drupal.org/project/farm/issues/3173969 - this will be a good place to collect/organize strings.

@mstenta
Copy link
Member

mstenta commented Jan 10, 2022

@SirSundays Have you found strings already that seem like they will need additional context? I imagine this would be obvious if there is a translation already available for a string from localize.drupal.org, but it doesn't make sense in relation to the same string in farmOS. Just curious if you've found any like that yourself. I know someone specifically mentioned "asset" in https://www.drupal.org/project/farm/issues/3173969.

@SirSundays
Copy link
Contributor Author

this will be a good place to collect/organize strings.

What do you think? Would it be better to document it here or on the drupal site?

Have you found strings already that seem like they will need additional context?

I think I have some in mind, but I want to go through the list tomorrow and write it down then.

I know someone specifically mentioned "asset" in

Yeah, sometimes there is more than one fitting translation. Some of my translations could be discussed with some other germans as well. But I hope nothing severe.

@mstenta
Copy link
Member

mstenta commented Jan 11, 2022

Would it be better to document it here or on the drupal site?

Here is fine! For historical reasons we use drupal.org for our canonical project management, with the forum for more general discussions, but we have the GitHub issues for quick bug reports etc, so it's sort of used as a "helper" issue queue. :-)

In this case it's helpful because people who are contributing translations are probably more likely to have a GitHub account so it lowers the barrier.

@horvan
Copy link

horvan commented Feb 4, 2022

I know currently just one word that needs context for sure. The Word Asset as Well as the plural Assets could have way other meanings in a Farmers context. So we need a context for Asset.

If I'll figure out more, while translating, I'll report them here.

But to figure them out the whole Distribution must be translated first. So it will eventually take a long time, until we can report some more.

@mstenta
Copy link
Member

mstenta commented Feb 6, 2022

Thanks @horvan! Appreciate your help with this too (and for opening that original issue on drupal.org)! :-)

In an effort to document the thought process in this issue, I'm going to think through a few things out loud...

Here is the string for "Assets" in localize.drupal.org for German language: https://localize.drupal.org/translate/languages/de/translate?sid=55182

In this example, the specific string "Assets" is currently being translated to "Medieninhalte" in German, which (thanks to Google Translate because I don't speak German) translates back to English as "media content". That is obviously not correct in the context of farmOS.

But it makes sense: we can also see from that link that this string was translated for a number of other Drupal projects, most of which DO deal with "media content". For example, the abandoned D7 Asset module, among others.

Arguably, our usage of "Assets" is more generic (meaning "things of value"), so one could make the case that those other modules have more reason to add context than farmOS does - but as the sayings go: "first come, first serve" and "it's not our fault but it is our problem". Obviously we cannot change things now. :-)

In general, though, aside from that specific string above, it seems that MOST strings that include "asset" are unique to farmOS (and are not translated): https://localize.drupal.org/translate/languages/de/translate?project=farm&status=0&release=529551&search=asset&author&context=all&limit=50&sid=0

So, I don't think we need to add context to ALL strings in farmOS that contain "asset". I think we can be more targeted, and only add context for ones that we know have conflicts already. Otherwise, we are the "first come first serve". :-)

@mstenta
Copy link
Member

mstenta commented Feb 6, 2022

I think we can be more targeted, and only add context for ones that we know have conflicts already.

Honestly I don't love this approach, because it means adding "cruft" to our codebase simply to address specific historical artifacts on localize.drupal.org. Each time we do so, we should probably include a comment that points to the specific string IDs upstream and describe why we need the additional context in that bit of code.

But it seems that adding context to all strings is a much bigger headache - both initially, and moving forward. Everyone who is developing a farmOS module would need to be aware of the strings that "should" have context includes. So it still feels better to target specific instances as needed.

@mstenta
Copy link
Member

mstenta commented Feb 6, 2022

@SirSundays In my investigations above, I noticed a few strings that were previously translated one way, but you suggested a different approach.

For example:

It seems that "Betriebsmittel" translates to "operating resources" (again, according to Google Translate), which is much better than "media content".

But it seems that you decided to use the string "Asset" instead of "Betriebsmittel", and suggested that they be changed in localize.drupal.org. I'm curious if there is a reason for this?

I suppose this highlights the difficult nature of localization in general! I'm learning a lot in this process. :-)

@SirSundays
Copy link
Contributor Author

@mstenta Sorry for the late response.
When I was translating I only translated things that were shown as untranslated, so I didn't know that there was a translation.
But nevertheless, Betriebsmittel is a very bulky word and Asset is at least for me a better fitting translation because it describes what you mentioned earlier ("things of value"). When I´m unsure about a translation I normally look up all the options on dict.cc. It is a community-driven dictionary. Here is an example for "asset":
https://www.dict.cc/?s=asset
As you can see there many different translations for just the word asset depending on how you look at it. That's what makes it so hard.
I think there could be multiple fitting translations, but the community has to decide on what fits best. At least the farmer we are working with didn't complain about Asset 😂

@mstenta
Copy link
Member

mstenta commented Feb 8, 2022

Thanks @SirSundays - that all makes sense. I like "Assets" better too, if it meets the need. :-)

@SirSundays
Copy link
Contributor Author

After my vacation, I now got back to translating. To be honest there are not that many words that may need context. I started to translate 50 strings a day and the last two days there was nothing where I thinks it was worth mentioning.

So because I only can make suggestions for a translation and with people I talked to about all the Asset and Log stuff, I decided to make two suggestions and let the translating pros then decide what is best.

But here is also some stuff that needs context (as I sad that will not be much and I will post daily if I find something):

  • Field module / Field modules (is it a Field like in a form or a field in the real world)
  • Location: @value (not quite sure what type of location is meant) (but something with "Location" in it needs context most of the time)

BTW I also found some "duplicates" for example:

  • Hide if false / Hide if FALSE
  • Hide if true / Hide if TRUE (don´t know if it really is a duplicate but seems like it)

Also sometimes plural and non-plural strings are translated together and sometimes I find them separated from each other. But that's a whole other story.

@mstenta
Copy link
Member

mstenta commented Apr 13, 2022

Thanks for your continued efforts on this @SirSundays!

I suppose we should start collecting the specific lines of code that correspond to these strings that need context. Are you comfortable finding these (via grep or other search tools) and making a list? Or even taking it one step further and starting a pull request?

If not, I would be happy to help! Perhaps we could find a time to work together on it in real time. One of the weekly dev calls, or via the chat room - open to ideas! Very glad that you're helping to move this ball forward. :-)

@SirSundays
Copy link
Contributor Author

I think I could search for some of them with VS Code. It will show me all the strings in the project, so that should work. But I will be unsure what the correct "context" sometimes would be.

I´m open to a meeting. Wouldn´t mind if it's the dev or an extra one.
Maybe if I got the hang of it once I could go on for myself. But if you could help me get started, that would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants