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

Extract class names, fields, etc #3

Open
pupeno opened this issue Mar 22, 2010 · 2 comments
Open

Extract class names, fields, etc #3

pupeno opened this issue Mar 22, 2010 · 2 comments

Comments

@pupeno
Copy link

pupeno commented Mar 22, 2010

The original ruby gettext extractor also extracted fields and database names as translatable strings because they find their way into views quite often. Is it possible to add that to this extractor too?

@retoo
Copy link
Owner

retoo commented May 25, 2010

I use the 'store_model_attributes' task of Michael Grossers gettext/rails integration plugin: http://github.com/grosser/gettext_i18n_rails

This generates a file local/model_attributes.rb which contains all model names and attributes. I like this method as I can regenerate this file whenever I know there are new attributes (and therefore it doesn't slow down the usual gettext:find rake tastk)

What do you think about this approach?

Cheers,
Reto

@pupeno
Copy link
Author

pupeno commented May 25, 2010

I don't like generating source code for a side effect, that is never going to be executed. But on the other side, I can also see why that way could be seen as cleaner.

At any rate I believe the real issue is that I solved a problem that was already solved because using gettext involves picking pieces from many different locations, finding out about those pieces and combining them carefully. I believe there should be a more ready-to-work gettext solution (and I wish to work on that, I just don't have the time, yet).

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