Support alternative translation files layouts

Asked by Emilien Klein

I know the documentation [1] is pretty clear on the directory layout that is necessary for Launchpad to automatically import translations from branches. However, it happens pretty often (more and more I should say) that I find a project that could benefit from Launchpad translations, but that don't comply with Launchpad's requirement, and I'm not that enthusiast to have to ask a project to change it's internal structure to fit to LP. This is usually a pretty weird way to introduce you to a new project (i.e. people you don't know):

======== START SAMPLE EMAIL ========

Hi, I see your project is looking for new translations!
I would like to propose to help you reach more translators by setting up your project on Launchpad. However, you will have to change the following :
Move all your .po files that are currently like this:
www/locale/nl_NL/LC_MESSAGES/django.po

to the base of your www/locale directory, and change the name of the .po file to contain the language name, like this:
www/locale/nl.po

You also need to have the translation template in the same directory, like this:
www/locale/<PROJECTNAME>.pot

Hope you can manage to do those changes!
Please tell me if you'd need help to perform those steps, I'd be more than happy to help you.

======== END SAMPLE EMAIL ========

I am pretty convinced that the LP infrastructure would be able to adapt to this kind of structure. I don't know if it is Django-specific, but it would be nice if the discussion about supporting alternative directory structures could be had (if it hasn't already?)

In this structure, you have the same metadata than in a flat structure, you know they are for language nl_NL (keep only letters before the underscore if needed), and all the languages are in the folder that's "../.." relative to the first "LC_MESSAGES" you encounter when scanning the branch. And if the problem is to export the .po files, I suppose adding a field in the LP database to store where to export the .po file back could be an possibility.

I am sure you smart guys can find a way to make this work, if you really want it ;) It would help get more projects on LP, more translations and thus more translators, potentially for other projects. The reason why I'm bringing this up is that I really like the translation platform you've built, and the incredible community of translators that's around it. Improving it to support additional project structures would be a nice step forward!

Please take a minute and think of this. It doesn't need to happen in the next version, I'd already be happy if you could discuss it in your next development cycle kick-off meeting!

Thanks!

[1] https://help.launchpad.net/Translations/YourProject/ImportPolicy?action=show&redirect=Translations%2FImportPolicy#Sample%20directory%20layout

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Emilien Klein (emilien-klein) said :
#2

A comment to re-activate this question.

Revision history for this message
Данило Шеган (danilo) said :
#3

Sorry for the late response. Actually, we would like to support these layouts, it's just that we lack the time to implement them at the moment. Related bugs have been filed some time ago (eg. bug 444706 and bug 540628), but we can't promise when we'll have time to support these layouts.

Revision history for this message
Emilien Klein (emilien-klein) said :
#4

Thanks Данило, I'm a patient person ;)

Revision history for this message
David Planella (dpm) said :
#5

Hi Emilien,

I think yours are all valid points, I just wanted to make a couple of
comments for clarification.

El dv 30 de 07 de 2010 a les 09:24 +0000, en/na Emilien Klein va
escriure:
> New question #119443 on Launchpad Translations:
> https://answers.launchpad.net/rosetta/+question/119443
>
> I know the documentation [1] is pretty clear on the directory layout
> that is necessary for Launchpad to automatically import translations
> from branches. However, it happens pretty often (more and more I
> should say) that I find a project that could benefit from Launchpad
> translations, but that don't comply with Launchpad's requirement,

Just to make it clear, this requirement comes from trying to accomodate
to the most common layout used in projects based on gettext. It is only
Launchpad-specific in the sense that Launchpad adopted (for a good
reason) that widely-used layout.

> and I'm not that enthusiast to have to ask a project to change it's
> internal structure to fit to LP. This is usually a pretty weird way to
> introduce you to a new project (i.e. people you don't know):
>

I see the point. However, changing the layout to follow widely used
conventions can also benefit a project in making its build system rules
simpler and cleaner. If the project adapts to conventions, it will then
be able to use e.g. standard makefile rules instead of having to rewrite
their own from scratch.

[...]
>
> I am pretty convinced that the LP infrastructure would be able to
> adapt to this kind of structure. I don't know if it is
> Django-specific, but it would be nice if the discussion about
> supporting alternative directory structures could be had (if it hasn't
> already?)
>

Danilo's already answered this one, but yeah, the "mo layout", how we
sometimes call it is specific from web-based applications, generally
Django and IIRC also some php-based apps.

[...]

Regards,
David.

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella

Can you help with this problem?

Provide an answer of your own, or ask Emilien Klein for more information if necessary.

To post a message you must log in.