hey my friend,
this is solo in China, i found this project just now and very like it. i think i can use this project to help to translate many project to my language. but i have some trouble with this module, as the readme says, i can translate drupal mod easily(i tried to scan and translate jquery update and succeed). but when i try to upload a tar file which is not a drupal project, it returns "No (new) local packages found to scan in MYDIR" when i run scan. could any1 tell me a step to step introduction to translate not drupal projects? and more, there are many projects with a php lang files, just like:

ErrorFieldRequired=Field '%s' is required
ErrorFieldFormat=Field '%s' has a bad value
ErrorFileDoesNotExists=File %s does not exist
ErrorFailedToOpenFile=Failed to open file %s
....

how to convert such a file to a po/pot file? or whether this project can deal with these files directly?
finally, thanks for your great project and hope your respond.
regards
solo

Comments

gábor hojtsy’s picture

Status: Active » Closed (duplicate)

There was feverish development on the module to make it work less as a Drupal-tied translation tool and more like a generic translation tool. Current plans include to support import of bare .po files instead of looking for tar.gz files with code using the Drupal APIs. You can package whatever as tar.gz files it will not be parsed properly, if it is not code using the Drupal APIs. Some people implemented custom connectors or hacked code generators to generate code looking like using the Drupal APIs. Currently Open Atrium (Drupal based), Gallery 2 and Musescore (neither Drupal based) use the localization server outside of Drupal itself to translate with a community.

So in the short term, look at #204171: Add connector to load bare .po files for a generic solution to work with .po files as input and output. Your source formats will probably need to be converted to .po files, and there might be tools to convert to that depending on your actual format (I do not recognize the format you cited here though).

I'm marking this one a duplicate on the generic .po loader.