Modify

Opened 2 years ago

Closed 13 months ago

Last modified 11 months ago

#18235 closed enhancement (fixed)

Add new language Serbian with Latin script (sr@latin)

Reported by: Klumbumbus Owned by: stoecker
Priority: normal Milestone: 20.08
Component: Trac Version:
Keywords: Cc: Don-vip

Description

see wiki:/Translations/Statistics#Problempages
I'm not sure where the language code needs to be added.

Attachments (3)

for_translation_josm_josm-plugin_matsim_sr@latin.po (16.9 KB) - added by BrackoNe 13 months ago.
MATSim - Serbian (Latin) Translation
for_translation_josm_josm-plugin_Mapillary_sr@latin.po (63.2 KB) - added by BrackoNe 13 months ago.
Mapillary - Serbian (Latin) Translation
turn-restriction_plugin.png (44.5 KB) - added by BrackoNe 11 months ago.
Maybe the problem is that we have set sr-Latin for Serbian?

Download all attachments as: .zip

Change History (47)

comment:1 Changed 2 years ago by BrackoNe

Me neither. I'm adding Serbian language with "rs" official abbreviation. Please feel free to change to "sr-latn-rs" if you want to have more specific description.

comment:2 Changed 2 years ago by stoecker

Cc: Don-vip added

You have to change TracLanguages.

But like always this is more complex. There is no code Rs. And a code with script specification is neither supported by the wiki nor by JOSM. I have to think about how this needs to be handled first.

Aaargh. Why is I18N always so complicated? Each language brings a new bunch of trouble.

I think if we follow our existing schema the correct prefix should be "Sr-Latn_RS" and in josm "sr-latn_RS". But that needs code adaptions I fear.

My proposal for now would be to use "Sr_RS". That's not wrong, but does not use the script spec. We can postpone the work to support script codes to the time when we get the situation that Sr-Cyrl_RS also appears. For Chinese we also Use CN_Zh and CN_TW and not the script variants of these languages which would be more correct.

Any other ideas?

@BrackoNe:

You know that without software translation in JOSM the translated wiki pages like StartupPage aren't accessible from JOSM?

comment:3 Changed 2 years ago by BrackoNe

No, but I'm planning to translate JOSM server messages, as well JOSM interface. I will need help to find lang file because I have found one ~200+ kB, but I have a problem with formating, so I believe it is a wrong file.

Also, can you please change sr_RS as you proposed or to sr-Latn_RS?

Thanks in advance,
Nemanja

comment:4 Changed 2 years ago by stoecker

JOSM core is translated at Launchapd (see Translations). Launchpad and Transifex use "sr@latin" as language code. That is already supported by the software as ca@valencia uses the same method (Ca-Valencia for the wiki). That would mean the wiki code is "Sr-Latin".

So new proposal: Use Sr-Latin: for wiki pages (we can rename them, don't recreate!) and sr@latin as software-code. This does not need any new code and follows rules established by the translation platforms.

I don't think the _RS is needed, as we probably never will have a second Sr variant (and if, then the second one simply will get the underscore with correct specs).

P.S. Launchpad also has sr@Latn. Don't use this, as it is not compatible.

comment:5 Changed 2 years ago by BrackoNe

I'm already translating at Launchpad. I can see there is 31 → 40 of 11575 results, I hope I'm on the right one.

Thanks,
Nemanja

comment:6 Changed 2 years ago by stoecker

Yes. It's the right one. I renamed wiki pages and added sr@latin to trac languages. That works already now (thought not yet from within JOSM).

Note that the mimimum for JOSM inclusion of a new language is 2000 core texts. It will probably take you some time to reach that goal.

Though as far as I remember the initial Japanese translation reach 100% (about 8 to 10000 texts a that time) after about 3 or 4 days. :-)

comment:7 Changed 2 years ago by BrackoNe

Nice, thanks for help and confirmation that I'm in the right file.

Haha 3-4 days? As you said: Japanese... :)

comment:8 Changed 2 years ago by stoecker

NOTE: "A translation still in progress" note may be added with outdated=.... message in TranslatedPages macro. This is also shown in the status tables. I changed the download page accordingly.

Also note the revision in translation macro indicates the original english page. That's very important for later updates.

Last edited 2 years ago by stoecker (previous) (diff)

comment:9 Changed 2 years ago by BrackoNe

Okay.

comment:10 Changed 2 years ago by Klumbumbus

Resolution: fixed
Status: newclosed

comment:11 Changed 14 months ago by BrackoNe

Hello,

I can see that Serbian Latin wasn't included in latest official build, even I have translated 2455 strings (20%).
I have downloaded nightly build as well, but there is no Serbian Latin also. Can anyone tell me why?

Thanks,
Nemanja

comment:12 Changed 14 months ago by Klumbumbus

That doesn't work automatically. Each language needs to be added manually.

comment:13 in reply to:  12 Changed 14 months ago by BrackoNe

Replying to Klumbumbus:

That doesn't work automatically. Each language needs to be added manually.

I didn't know that. Who can I ask to add it?

comment:14 Changed 14 months ago by stoecker

Milestone: 20.08
Resolution: fixed
Status: closedreopened

comment:15 Changed 14 months ago by stoecker

Summary: Rs: Translated page language code unknownAdd new language Serbian with Latin script (sr@latin)

comment:16 Changed 14 months ago by stoecker

2000 core strings verified.

     [exec] Created file ../core/resources/data/sr-latin.lang   : Added  2169 strings out of  9418 ( 23.0%).

I'll do the necessary changes tomorrow (testing writing to new SVN copy in the process :-)

comment:17 Changed 14 months ago by BrackoNe

Thanks! I have uploaded a new .po file and it is waiting for validation. Will updated translations automatically be taken, or I have to raise the flag each time?

comment:18 Changed 14 months ago by stoecker

No further action from your side necessary except reaching the 100%...

Updates are manual as well (maybe we should automate them, it's anyway a single command only), but are done for all supported languages at least once before each tested version, sometimes more often.

comment:19 Changed 14 months ago by BrackoNe

Thanks for clarification!

Can you help me to understand how I can manually add the translation file (.po or .mo) and test it, if it is updated just once a month (on tested version release)?
I thought it would automatically pull new translations files for each night build.

comment:20 Changed 14 months ago by stoecker

In 35518/osm:

see #18235 - add sr@latin to i18n

comment:21 Changed 14 months ago by stoecker

In 16873/josm:

add sr@latin language, see #18235

comment:22 Changed 14 months ago by stoecker

Please check if everything is fine (access to OSM wiki, to JOSM wiki, ...).

One thing I noted, but wasn't able to fix: In the language preferences the other languages are shown in cyrillic and not latin. Either a java bug or we need to find a fix. But the script is correctly set as far as I can see.

Can you help me to understand how I can manually add the translation file (.po or .mo) and test it, if it is updated just once a month (on tested version release)?

Easiest way would be to checkout JOSM as stated here: Source code (full checkout, not only josm) and call ant updatecore in the i18n directory. Then build JOSM (with ant in core) and start it. Needs a proper build environment.

I thought it would automatically pull new translations files for each night build.

No, not yet. Sorry for that.

Last edited 14 months ago by stoecker (previous) (diff)

Changed 13 months ago by BrackoNe

MATSim - Serbian (Latin) Translation

Changed 13 months ago by BrackoNe

Mapillary - Serbian (Latin) Translation

comment:23 Changed 13 months ago by BrackoNe

Hello once again.

I have translated Mapillary and MATSim plugins offline.
Since there is no sr@latin @ https://www.transifex.com/josm/josm/language/sr/ where should I upload it?
Can you, please, place it to correct location?

Also, how can I filter out all JOSM Server translation to complete that translation firstly?

PS. I'm using paid version of Poedit to translate JOSM and its modules.

Thank you in advance,
Nemanja

comment:24 Changed 13 months ago by stoecker

For translation aside from JOSM infrastructure you need to contact the relevant developers directly (usually via GitHub). They've choosen not to use the established JOSM standard.

comment:25 Changed 13 months ago by simon04

Type: defectenhancement

comment:26 Changed 13 months ago by Klumbumbus

Can this ticket be closed?

comment:27 Changed 13 months ago by BrackoNe

Yes if you ask me. :)
Please just tell me how can I filter out in PO file all server messages to translate these first.

Thanks,
Nemanja

comment:28 Changed 13 months ago by Klumbumbus

I fear thats not possible, Dirk?

comment:29 in reply to:  27 Changed 13 months ago by stoecker

Replying to BrackoNe:

Yes if you ask me. :)
Please just tell me how can I filter out in PO file all server messages to translate these first.

What do you mean with "server" messages?

comment:30 Changed 13 months ago by stoecker

Resolution: fixed
Status: reopenedclosed

comment:31 Changed 13 months ago by BrackoNe

I ment on this:
Server
JOSM server data
English (113 normal strings)

Which is available here:
https://josm.openstreetmap.de/wiki/Translations/Statistics

comment:32 Changed 13 months ago by stoecker

In the i18n directory you can show the strings: ./langinfo.pl ../core/nodist/trans/en.lang
These currently are the plugins descriptions, see wiki:Plugins, they are marked with "build/trans_plugins.java" as source in the po files.

comment:33 Changed 11 months ago by BrackoNe

Hi! Sorry for reusing this topic, but it is somehow related.
I have translated the "turn restriction" plugin completely which is part of JOSM core now, but it is still displaying only English strings. What's wrong?

Thanks,
Nemanja

comment:34 Changed 11 months ago by simon04

In 35577/osm:

see #18235 - turnrestrictions: i18n update

comment:35 in reply to:  33 Changed 11 months ago by simon04

Replying to BrackoNe:

What's wrong?

Thanks for your translation efforts. Nothing is wrong. The i18n update has always been a manual process which is typically performed shortly before a new JOSM stable release. Just now, I've updated the turnrestrictions plugin.

comment:36 Changed 11 months ago by BrackoNe

Thanks for clarification and prompt reaction!

comment:37 Changed 11 months ago by BrackoNe

Hmm, I have updated it to 35577, but still all things are in English, except tabs in Editor.

Changed 11 months ago by BrackoNe

Attachment: turn-restriction_plugin.png added

Maybe the problem is that we have set sr-Latin for Serbian?

comment:38 Changed 11 months ago by stoecker

The i18n process has a delay of up to 1 day (manual download is needed when this is to slow). Maybe simon was too fast and your translations aren't really incorporated when you did them shortly before?

comment:39 Changed 11 months ago by BrackoNe

Translation was ready at the time of last stable release.

comment:40 Changed 11 months ago by stoecker

You're right. Files are fine, something else is broken here.

comment:41 Changed 11 months ago by stoecker

In 17182/josm:

see #18235 - fix loading of sr@latin and ca@valencia from external sources

comment:42 Changed 11 months ago by stoecker

Please next time open a new ticket for issues.

comment:43 Changed 11 months ago by BrackoNe

I will, sorry. I said it is somehow related, but I understand...

comment:44 Changed 11 months ago by simon04

I've opened #19929 in order to get this fix listed under the correct milestone.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain stoecker.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.