Difference between revisions of "Thread:Support/TheWikipediaLibrary - json-based i18n files in addition to existing gettext/reply"

From translatewiki.net
Jump to navigation Jump to search
 
m
 
Line 1: Line 1:
 
Thanks a lot! JSON is generally easier to manage than PO.
 
Thanks a lot! JSON is generally easier to manage than PO.
   
One issue I immediately see is that you output non-ASCII characters as escapes, such as <code>"101_short_description": "<p>\u0627\u0644\u0645\u0646\u0647\u0644"</code>, etc. According to the convention documented at [[:mw:Localisation file format]], it's preferable to use the actual letters and not escapes. Will it be possible to do it? Since humans won't have to deal with these files very often, it's probably not a blocker, although [[User:Abijeet Patro]] and [[User:Nike]] should correct me if I'm wrong. That said, humans ''may'' have to deal with it; for example, sometimes it's too difficult to find things in translatewiki itself and it's more convenient to grep through the source.
+
One issue I immediately see is that you output non-ASCII characters as escapes, such as <code>"101_short_description": "&lt;p>\u0627\u0644\u0645\u0646\u0647\u0644"</code>, etc. According to the convention documented at [[:mw:Localisation file format]], it's preferable to use the actual letters and not escapes. Will it be possible to do it? Since humans won't have to deal with these files very often, it's probably not a blocker, although [[User:Abijeet Patro]] and [[User:Nike]] should correct me if I'm wrong. That said, humans ''may'' have to deal with it; for example, sometimes it's too difficult to find things in translatewiki itself and it's more convenient to grep through the source.
   
 
Moreover, perhaps you don't need to convert the translated files ''at all'': maybe it will be enough to add en.json and qqq.json and let the translatewiki import/export scripts generate the JSON files with the translations.
 
Moreover, perhaps you don't need to convert the translated files ''at all'': maybe it will be enough to add en.json and qqq.json and let the translatewiki import/export scripts generate the JSON files with the translations.

Latest revision as of 16:59, 30 March 2021

Thanks a lot! JSON is generally easier to manage than PO.

One issue I immediately see is that you output non-ASCII characters as escapes, such as "101_short_description": "<p>\u0627\u0644\u0645\u0646\u0647\u0644", etc. According to the convention documented at mw:Localisation file format, it's preferable to use the actual letters and not escapes. Will it be possible to do it? Since humans won't have to deal with these files very often, it's probably not a blocker, although User:Abijeet Patro and User:Nike should correct me if I'm wrong. That said, humans may have to deal with it; for example, sometimes it's too difficult to find things in translatewiki itself and it's more convenient to grep through the source.

Moreover, perhaps you don't need to convert the translated files at all: maybe it will be enough to add en.json and qqq.json and let the translatewiki import/export scripts generate the JSON files with the translations.