Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customize vinaigrette makemessages to use custom locale destination #7

Open
pwalsh opened this issue Apr 23, 2014 · 4 comments
Open

Comments

@pwalsh
Copy link

pwalsh commented Apr 23, 2014

Hi,

I'm looking at vinaigrette as an alternative to managing translations in a database on a current project.

However, I'd like to ensure that strings from the database are not mixed in .po files with strings from the codebase.

Has this use case come up before? Can we handle it with the current command (I don't think so)...

I'd be happy to write something like this, but I'm curious as to your thoughts.

I imagine something like:

VINAIGRETTE_LOCALE_BASE = 'my.project.database_translations'

and then .po files. etc. would be there.

This gives me to flexibility to have an open source codebase with translation strings, but the data of an instance can be separate if it needs to be closed source.

@ghost
Copy link

ghost commented Apr 23, 2014

We've been wondering the same thing actually. I'd still put it in the same directory, that's where it goes, logically, but perhaps in a separate po file. It's not really a huge issue since our project is closed source (except for the generic bits like this, which we do open-source); our bigger problem in the short term will be to add more context to the strings in the po file, to help the translators.
If you're willing to write the patch, and it doesn't slow things down, we'll be happy to merge it.

@pwalsh
Copy link
Author

pwalsh commented Apr 24, 2014

The problem with putting it in the same directory is that it is a bit harder to version separately, and impossible to maintain as a git submodule, for example.

But, I could make each an option.

Without me diving deep into the code yet, it seems to me the only changes required are in the management command. If you think otherwise, please let me know. Anyway, I'll find out soon enough :)

@pwalsh
Copy link
Author

pwalsh commented May 4, 2014

Hi,

Just updating that I'm dropping my proposed changes. I've been playing with the code and realised that this method of translation for database content doesn't suit my use case: For example - search for strings in the translated content.

@rory-geoghegan-ecometrica
Copy link
Contributor

I'm reopening this feature because it doesn't sound like that much work and it's something that could be useful for us. Basically, from the django docs on the subject, I would have vinaigrette dump the po file in another locale directory and have to add that directory to settings.LOCALE_PATHS.

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

No branches or pull requests

2 participants