Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Issues with importing messages from Translatewiki #2305

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments
Closed

Issues with importing messages from Translatewiki #2305

openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments

Comments

@openstreetmap-trac
Copy link

Reporter: avarab[at]gmail.com
[Submitted to the original trac issue database at 10.47am, Wednesday, 23rd September 2009]

I'm filing a bug because I need somewhere to host these huge patches:

How to sync from Translatewiki manually:

for i in $(ls *yml | grep -v en.yml); do echo wget "http://translatewiki.net/w/i.php?title=Special%3ATranslate&task=export-to-file&group=out-osm&language=$(echo $i | sed s/.yml// | tr 'A-Z' 'a-z')" -O $i; done

Attached is a unified diff patch and a pretty-formatted one to show what's changed.

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 9.56pm, Wednesday, 23rd September 2009]

Actually trac doesn't take attachments of this size, here they are:

Some URLs for example are being removed. This is a matter of policy [http://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki/path&path=/trunk/extensions/Translate/groups/OpenStreetMap/OpenStreetMap.yml in the exporter]. I've already fixed some of these (e.g. not nuking wiki URLs).

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 10.14pm, Wednesday, 23rd September 2009]

Here are some outstanding bugs with the patch & comments:

Messages nuked because Translatewiki doesn't understand rails plural forms:

    -browse.changeset_details.has_nodes: "T els segents {{count}} nodes:"                                                                                  
    -browse.changeset_details.has_relations: "T les segents {{count}} relacions:"                                                                          
    -browse.changeset_details.has_ways: "T els segents {{count}} camins:"

Leaking "FUZZY" into messages:

    -activerecord.attributes.user.display_name: Name anzeigen                                                                                                
    +activerecord.attributes.user.display_name: "!!Fuzzy!!Name anzeigen"

This is OK, we should be nuking whitespace:

    -browse.node_details.coordinates: ": "                                                                                                      
    +browse.node_details.coordinates: ":"

We should nuke stuff equivalent to en.yml:

     export.start_rjs.export:                                                                                                                         
    -html.dir: ltr                                                                                                                                           
     map.coordinates: ":"

    -layouts.project_name.h1: OpenStreetMap                                                                                                                  
    -layouts.project_name.title: OpenStreetMap

OK, nuking no longer used messages (not in en.yml):

    -changeset.list_bbox.history: Historial                                                                                                                  
    -changeset.list_bbox.no_area_specified: No se especific un rea                                                                                         
    -changeset.list_bbox.no_changesets: Sin conjuntos de cambios                                                                                             
    -changeset.list_bbox.recent_changes: Cambios Recientes                                                                                                   
    -changeset.list_bbox.show_area_box: mostrar caja                                                                                                         
    -changeset.list_bbox.view_tab: pestaa vista                                                                                                             
    -changeset.list_bbox.view_the_map: ver el mapa                                                                                                           
    -changeset.list_user.edits_by_username: Ediciones hechas por {{username_link}}                                                                           
    -changeset.list_user.for_all_changes: Para los cambios de todos los usuarios vea {{recent_changes_link}}                                                 
    -changeset.list_user.no_visible_edits_by: "{{name}} no ha hecho ediciones visibles."                                                                     
    -changeset.list_user.recent_changes: Cambios Recientes 

Otherwise it seems fine.

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 7.50pm, Saturday, 26th September 2009]

Here's how I review these:

diff old:

for i in $(ls *yml | grep -v en.yml); do perl ../../script/locale/diff --dump-flat $i > $i.0 ;done

get new:

for i in $(ls *yml | grep -v en.yml); do wget "http://translatewiki.net/w/i.php?title=Special%3ATranslate&task=export-to-file&group=out-osm&language=$(echo $i | sed s/.yml// | tr 'A-Z' 'a-z')" -O $i; done

diff new:

for i in $(ls *yml | grep -v en.yml); do perl ../../script/locale/diff --dump-flat $i > $i.1 ;done

get a patch to review:

for i in $(ls *yml | grep -v en.yml); do diff -ru $i.*; done

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 8.40pm, Saturday, 26th September 2009]

Replying to [comment:2 avarab[at]gmail.com]:

Update: These are now the existing bugs:

    -browse.changeset_details.has_nodes: "T els segents {{count}} nodes:"                                                                                  
    -browse.changeset_details.has_relations: "T les segents {{count}} relacions:"                                                                          
    -browse.changeset_details.has_ways: "T els segents {{count}} camins:"

This is still the case.

Leaking "FUZZY" into messages:

This was an issue of a user manually inserting "FUZZY" into a message, not the export being broken.

Here are some more issues:

It's removing messages which were on the OpenStreetMap.yml ignore list during import, e.g.:

-layouts.help_wiki_url: http://wiki.openstreetmap.org/wiki/RU:Main_Page

and:

-layouts.intro_3_bytemark: bytemark                                                                                                          
-layouts.intro_3_ucl:  UCL VR

It doesn't grok that site.key.table.entry.* can be an array or a string:

Original in en.yml:

school:
  - School
  - university

Version in zh-TW.yml:

school: ""

It removes this because the key doesn't exist, from zh-TW.yml diff:

-site.key.table.entry.school: 

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 8.32pm, Monday, 28th September 2009]

Outstanding merge issues were solved with a script in [17828] and subsequent commits. Closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant