Extraneous TRANSLATORS comment

Bug #1807701 reported by Steven De Herdt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands Website
Fix Released
Undecided
Unassigned
widelands
Fix Released
Undecided
Unassigned

Bug Description

In data/world/terrains/init.lua in the documentation for new_terrain_type, there's a comment-in-comment on line 82. This causes the next ~70 lines to appear as a tip for translators for the string "Meadow 1", at least in the po-file. Maybe it looks strange in the sphinx docs too, haven't tested that.
Probably better to remove this line that I suppose got there by copy-paste.

Related branches

Steven De Herdt (stdh)
tags: added: lowhangingfruit
Revision history for this message
Steven De Herdt (stdh) wrote :

Two more small things (see patch):
*A stray ']' in a URL;
*the 'many, many more' in the contributor's file is not translated.

It's rather late to add strings now, but if it isn't available for translation it would be in English anyway...

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

can confirm this and we should have it for b20 togehter with the other necessary changes (see bug for frisian bushes translations)

Changed in widelands:
status: New → Confirmed
milestone: none → build20-rc1
Revision history for this message
kaputtnik (franku) wrote :

I have a working branch that will fix this issues. But i am not sure if i messed up the automatic creation of developers.lua :-D At least recreating it by running utils/update_authors.py produces a developers.lua which get nicely formatted in the 'About Widelands' page, see screenshot.

Not sure though how the communication between transifex and widelands works and if the produced developers.lua is correct for transifex.

kaputtnik (franku)
affects: widelands → widelands-website
Changed in widelands-website:
milestone: build20-rc1 → none
affects: widelands-website → widelands
Changed in widelands-website:
assignee: nobody → kaputtnik (franku)
Changed in widelands:
assignee: nobody → kaputtnik (franku)
kaputtnik (franku)
Changed in widelands-website:
status: New → In Progress
Changed in widelands:
status: Confirmed → In Progress
milestone: none → build20-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :

Feel free to leave the developers file alone - it has always been untranslated

Revision history for this message
kaputtnik (franku) wrote :

The developers.json has been untranslated, but the headings are translated. As far in understand the translation marker is added into developers.lua when running update_authers.py. If this is a correct assumption, the branch ads a translation marker to the last string ("and many, many more...") and make this string a standalone string. So this string can be translated.

I do not know how the translations are shown. So i don't know if more steps are needed to get the last string ("and many, many more...") will be shown translated.

Revision history for this message
GunChleoc (gunchleoc) wrote :

The only solution is to hard-code it into AUTHORS.lua

If we added it programmatically, all the developers' names would end up on Transifex.

Revision history for this message
kaputtnik (franku) wrote :

My answer was not very descriptive. What this branch does:

1. Strip out the last sentence from key 'Other' in developers.json
2. Adds a new key 'epilog' and put the removed string into this
3. modified update_authors.py to add the translation function (_) to the value of 'epilog'. When running update_authors.py the result in developers.lua is:

{epilog = _"and many, many more (thank you for everything you've done)"}

So the developers names aren't affected, imho.

Because of adding a new key, some other files needs changing, but the result is shown in the image in #3

My question is now: How get the strings, which needs translation, from developers.lua to transifex? Is it enough to add the translation function (_) like i did it? Or is this also some how dependent on the keys inside developers.lua?

Maybe i should just propose to merge :-D

Revision history for this message
kaputtnik (franku) wrote :

I decided to split the sting fixes from the translation issue. So we can discuss the translation in a separate branch then.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have approved the merge request, thanks for fixing!

I think having an extra "Epilogue" section just so we can add a translation marker is a bit overkill. Also, the fix doesn't scale - I'd prefer if we had the capability of selectively adding translation markers. We'd need some form of "translate if translation has been provided" function, or a hack in the Python script.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Regarding the comments in the deleted merge request:

1. adding a "translate" key to JSON is an excellent idea :)

2. +1 for not having everything on 1 line - I figured having it minified might be more efficient, but if it's creating issues with programming and debugging, do let's produce separate lines with proper indentation.

Revision history for this message
kaputtnik (franku) wrote :

> 1. adding a "translate" key to JSON is an excellent idea :)

I have a working branch which achieves this on my development machine. Had forgotten to upload it to launchpad before i went traveling. I will do next year ;)

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Changed in widelands-website:
status: In Progress → Fix Released
kaputtnik (franku)
Changed in widelands:
assignee: kaputtnik (franku) → nobody
Changed in widelands-website:
assignee: kaputtnik (franku) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments