Hi!
I was wondering how to import the latest translation into an existant drupal installation - in Drupal 5 we had one big de.po file now we have all the folders with small .po files. However when importing I don't want to import every single .po file. I've imported all of them in one step during the installation and then exported a de.po but I wonder if that's the propper way to do it or if there is a better one. Also if there is no better one - how about including the de.po as well?

cheers and thanks to the translation team
Sebastian

ps: I've attached the de.po I created out of the current dev version in case someone needs it.

CommentFileSizeAuthor
de.po498.03 KBs.daniel

Comments

osopolar’s picture

Title: de.po for Drupal6 » may you read the documentation

Have you read the documentation? You should have a look on the text at this page: /admin/build/translate/import
... it's really easy to just extract the translation in your drupal directory. And each translation is in its place and you only get translated what you really need. The only thing you have to do is to add/activate the language (I guess like you have done).

More additional information you will find her:
http://drupal.org/node/202631

kkaefer’s picture

I agree with s.daniel in that it's not easy to import a translation after you already installed Drupal. Additionally, on Mac OS X you can't extract a zipped file to overlay a directory via the GUI—you have to use the command line for doing that. Unfortunately, the packaging script transforms the original files to that format, so just adding a de.po file to the repository doesn't work.

kkaefer’s picture

kkaefer’s picture

Project: German translation » Drupal core
Version: 6.x-1.x-dev » 6.x-dev
Component: PO files » usability

Moving this to Drupal since I really think this needs fixing. I've had several people approach me and ask for how to import translations to an already installed Drupal. Unzipping them so that they overlay the Drupal directory is a pain; just importing one .po file is a lot easier.

alpritt’s picture

Title: may you read the documentation » Make translation imports easier on existing installs
maartenvg’s picture

Version: 6.x-dev » 7.x-dev

New features go into the upcoming version of Drupal. It sounds like a nice idea.

What do you propose as a solution? Do you want language maintainers to provide both separate module-specific translations AND a .po containing all translation strings? Or a system that reads a drupal-created tar.gz containing the separate .po's and processes them?

dawehner’s picture

for me i use a tiny little shell script which writes all po files into one.
It works well for me, even it has

"Project-Id-Version: installer\n"
"POT-Creation-Date: 2008-08-16 14:35+0200\n"
"PO-Revision-Date: 2008-08-16 20:40+0200\n"
"Last-Translator: Konstantin Käfer <kkaefer@gmail.com>\n"
"Language-Team: German Drupal translation team\n"
"MIME-Version: 1.0\n"
etc.

more than once in this file.

cat /home/foo/Desktop/folder_with_all_pos/*/*/translations/*.po > /home/foo/Desktop/de.po
s.daniel’s picture

Not an easy question as a (from an end users point of view) perfect solution (like a button "load latest stable translation files for all activated modules from drupal.org") is probably out of reach currently.
How about that as a quick fix:
Set up a drupal install somewhere outside of drupal.org. Provide a UI where people can choose the language and modules they want and a "generate translation file" button.

How hard would that be?

kkaefer’s picture

The correct command to create one *.po file from the split up files is: msgcat --use-first general.po [^g]*.po | msgattrib --no-fuzzy -o.

johnnoc’s picture

#8:

Provide a UI where people can choose the language and modules they want and a "generate translation file" button.

There is a project going towards this direction. Please see: http://drupal.org/project/l10n_server. The project page clearly states that "The ultimate goal of this project is to have a central translation server setup at drupal.org". On the localization server, users can choose a format when exporting files. Do they want Drupal 6 package format, Drupal 5 package format for autolocale module, flat package for CVS commit, or All in a single .po file? Presently, there are numerous translation teams who are alpha-testing the server.

@s.Daniel: But unfortunately, the german translation team has not listed their localization server. I personally don't know if they have their own localization server installed or not.

@#4 and #6
I don't think that this is an issue for the Drupal-core. This is more an issue for Drupal.org infrastructure.
In Drupal 5, you can import a single .po file by going to http://.../admin/settings/locale/language/import
In Drupal 6, you can import a single .po file by going to http://.../admin/build/translate/import
So, the problem lies in the releases of the translation files in d.o., not the Drupal core. If we can provide a download choice of a single .po file or multiple files, then a user can choose the format depending if its a new or existing installation, and Drupal core has the ability to import them already. This difficulty, of course, will be resolved once the localization server becomes stable enough to be utilized for thousands of projects multiplied by number of releases per project multiplied by number of languages supported.

Filtering translation projects listed on http://drupal.org/project/Translations with Drupal 6 releases, there are 26 languages out of 30 projects which have their own localization servers installed, mostly sponsored by their language-specific Drupal community. So there are _only_ 4 languages for Drupal 6.x who do not have the means of getting a single .po file for their language. While waiting for the central localization server, we can probably have a block on http://drupal.org/project/Translations giving some love to the third-party localization servers, so that users have a choice in downloading the files provided at http://drupal.org/project/Translations or going to a localization server specific to their language to get another format approriate for their installation.

So moving this to the Drupal.org Infrastructure issues queue (to promote faster development of the central location server) or the Webmasters issues queue (to promote the third-party localization servers of the translation teams for the meantime) is probably more appropriate. But of course, a new feature for Drupal 7.x to import a tar.gz file with all the .po files is also very welcome.

So, which issue queue is appropriate for this, really? :-)

John
----------------------
Drupal Norge
hvor oversettere, brukere, utviklere og leverandører av Drupal i Norge samles

s.daniel’s picture

#8
Hehe - as usually there is someone smarter than me who had the same Idea a little earlier.
We had a translation server but the translation of Drupal 6 made slow progress wich led to arguments inside the german community and finally in an irc meeting was decided that for the moment we would be better of with google code http://code.google.com/p/drupal-de/
(Please correct me if I said something wrong here)

#4 and #6
The issue I created originally was: End users need a link to a single .po file to download at http://drupal.org/project/de because they shouldn't have to deal with shell scripts, external projects or figuere out some other workaround. That issue is fixed now but you are right that this affects not only the de-project but every translation project and is something that should be fixed on d.o level - In the way it was done with the de-project - via linking to that single file (because it is a simple fix that can be set most rapidly with the most impact). So I guess the correct way would be to create seperate issues in every translation project (Please provide a single translation file to download for Drupal 6 translation.)?

jody lynn’s picture

Component: usability » ajax system
Status: Active » Closed (won't fix)

I believe translation import has changed via localize.drupal.org and this problem is no longer relevant.