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

any chance of using Rosetta to *add* new strings? #80

Open
michaelgeary opened this issue Jun 19, 2013 · 5 comments
Open

any chance of using Rosetta to *add* new strings? #80

michaelgeary opened this issue Jun 19, 2013 · 5 comments

Comments

@michaelgeary
Copy link

it seems that it is reading/writing the .po file anyways. Would it be a bad idea to let Rosetta add new terms?

@Glideh
Copy link

Glideh commented Dec 23, 2013

How would you match new terms with any string of your application ?

@generalov
Copy link

It should be useful to use django-rosetta as a web-based interface to generate and translate *.po files for external projects (which does not shares the same code base).

We use Django as admin interface (CMS) and API provider for AngularJS SPA (which uses gettext https://angular-gettext.rocketeer.be/). These projects are developed independently of each other. It should be useful to have ability to upload *.po files (new or update existing) to django-rosetta, translate and download translations.

@MattijnLahuis
Copy link

I would like to second generalov's comment. We have the same issue/feature request(?): We use angular-gettext to generate po(t) files and would love to be able to add strings to an existing po file in Rosetta. Any chance a solution will become available soon?

@todofixthis
Copy link

Here is a potential workaround that might help you accomplish what you are looking for, although it still requires making changes to Python code files.

For example:

  1. Create a file named strings.py somewhere in your Django project:

    > $EDITOR strings.py
    
  2. Add custom strings wrapped with ugettext_noop:

    from django.utils.translation import ugettext_noop as _
    
    _('Custom String 1')
    _('Custom String 2')
    
  3. Create *.po files:

    > python manage.py makemessages --all
    
  4. Custom strings are included in locale files:

    captura de pantalla 2015-07-15 a las 15 35 39

If desired, you could have an app – such as django-rosetta, perhaps (: – provide an interface for adding/removing strings defined in the file you created.

@psanlorenzo
Copy link

+3 years later, was this ever implemented in django-rosetta?

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

6 participants