Import/export suggestions
markus_petrux - September 9, 2009 - 14:24
| Project: | Localization server |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
This is something that has been suggested in #566126: new catalan language for localize.drupal.org (comments #11, #12, #15, #16).
However, the translation server for Catalan language only has 187 suggestions pending approval, and it seems easier to just go ahead and validate or discard them than writing such a feature for l10n_server.
But, this might still be of interest for other translation groups. So, I'm opening this f.r. here to see how many of you out there need this, and if it really worths, then see if we can do something about it.

#1
Given #570648: Add mass moderations screen for suggestions (+ user filtering) in place, I'm not sure teams need suggestions imported, since they can clean up their suggestions and import their translations right away.
BTW the reason we did not implement suggestion export originally is that one string can have many suggestions but *valid* .po files can only contain one translation per string. So there is no straightforward way to generate actually editable .po files (which PoEdit and similar tools can handle) of the suggestions. For pure export/import, theoretically, the l10n_server does not care about this invalidity.
#2
Well, we need to attract more contributors. If we don't, people translating a module directly on localize.drupal.org cannot get the resulting .po file until the review team does its job.
I suggest we add a "export suggestion" select box:
* Ignore suggestions
* Export the latest suggestion of non translated strings
* Export the latest suggestion of all strings
A smart default would be "Export the latest suggestion of non translated strings".
#3
The idea is to limit the import/export facility to translation teams and pregenerate packages of strings for the module releases. Otherwise generating .po files on the file on user request sounds like a non-scalable operation. Killes specifically asked us to not let mass-PHP-generated exports happen in protection of the underlying infrastructure.
#4
That said, we can always export those .po files with the latest suggestions for untranslated strings posing as translations but marked #fuzzy. That would let the import software on a Drupal site possibly skip the fuzzy strings. Since the CVS procedure did not have a review cycle and we are adding that here, this would be similar to the previous CVS resulting .po files, which did not even had the "under review" strings marked in a standard way.
#5
Just marked #478664: Need Export suggestions into one large po file from @podarok as a duplicate. Quoting:
#6
In my way i did a small SQL script for getting all the strings from database(csv) and after that reformatted it by hands into po file for importing into cvs.drupal.org
With a small change into script I can get all "suggestions" and put it into csv file
Possibly a good solution will be import-export via csv, not *.po ?
#7
SELECT `value`,`translation`FROM YOUR_DBNAME.l10n_community_string join YOUR_DBNAME.l10n_community_translation
on YOUR_DBNAME.l10n_community_string.sid = YOUR_DBNAME.l10n_community_translation.sid
Result can be stored as CSV and easy converted to po file that contains all translated and suggested strings.
After importing that file into new location - all translated strings would be marked as duplicates but all suggestions - as suggestions(If You select that option)