Modify

Opened 5 years ago

Closed 4 years ago

Last modified 4 years 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 4 years ago.
MATSim - Serbian (Latin) Translation
for_translation_josm_josm-plugin_Mapillary_sr@latin.po (63.2 KB ) - added by BrackoNe 4 years ago.
Mapillary - Serbian (Latin) Translation
turn-restriction_plugin.png (44.5 KB ) - added by BrackoNe 4 years ago.
Maybe the problem is that we have set sr-Latin for Serbian?

Download all attachments as: .zip

Change History (47)

comment:1 by BrackoNe, 5 years ago

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 by stoecker, 5 years ago

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 by BrackoNe, 5 years ago

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 by stoecker, 5 years ago

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 by BrackoNe, 5 years ago

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 by stoecker, 5 years ago

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 by BrackoNe, 5 years ago

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

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

comment:8 by stoecker, 5 years ago

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 5 years ago by stoecker (previous) (diff)

comment:9 by BrackoNe, 5 years ago

Okay.

comment:10 by Klumbumbus, 5 years ago

Resolution: fixed
Status: newclosed

comment:11 by BrackoNe, 4 years ago

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 by Klumbumbus, 4 years ago

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

in reply to:  12 comment:13 by BrackoNe, 4 years ago

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 by stoecker, 4 years ago

Milestone: 20.08
Resolution: fixed
Status: closedreopened

comment:15 by stoecker, 4 years ago

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

comment:16 by stoecker, 4 years ago

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 by BrackoNe, 4 years ago

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 by stoecker, 4 years ago

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 by BrackoNe, 4 years ago

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 by stoecker, 4 years ago

In 35518/osm:

see #18235 - add sr@latin to i18n

comment:21 by stoecker, 4 years ago

In 16873/josm:

add sr@latin language, see #18235

comment:22 by stoecker, 4 years ago

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 4 years ago by stoecker (previous) (diff)

by BrackoNe, 4 years ago

MATSim - Serbian (Latin) Translation

by BrackoNe, 4 years ago

Mapillary - Serbian (Latin) Translation

comment:23 by BrackoNe, 4 years ago

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 by stoecker, 4 years ago

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 by simon04, 4 years ago

Type: defectenhancement

comment:26 by Klumbumbus, 4 years ago

Can this ticket be closed?

comment:27 by BrackoNe, 4 years ago

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 by Klumbumbus, 4 years ago

I fear thats not possible, Dirk?

in reply to:  27 comment:29 by stoecker, 4 years ago

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 by stoecker, 4 years ago

Resolution: fixed
Status: reopenedclosed

comment:31 by BrackoNe, 4 years ago

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 by stoecker, 4 years ago

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 by BrackoNe, 4 years ago

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 by simon04, 4 years ago

In 35577/osm:

see #18235 - turnrestrictions: i18n update

in reply to:  33 comment:35 by simon04, 4 years ago

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 by BrackoNe, 4 years ago

Thanks for clarification and prompt reaction!

comment:37 by BrackoNe, 4 years ago

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

by BrackoNe, 4 years ago

Attachment: turn-restriction_plugin.png added

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

comment:38 by stoecker, 4 years ago

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 by BrackoNe, 4 years ago

Translation was ready at the time of last stable release.

comment:40 by stoecker, 4 years ago

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

comment:41 by stoecker, 4 years ago

In 17182/josm:

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

comment:42 by stoecker, 4 years ago

Please next time open a new ticket for issues.

comment:43 by BrackoNe, 4 years ago

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

comment:44 by simon04, 4 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.