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
seems we now need to run gettext:pot:create to update the pot file #117
Conversation
works fine here https://github.com/grosser/gettext_i18n_rails_example
is it maybe because no file is modified ? |
Well, we're still seeing some very strange behaviour with gettext not updating the language files. I think that is an issue in gettext though, and my workaround in this pull request doesn't solve it. |
I found that timestamp business kind of distracting myself ... it does not Do file timestamps not change when a file is updated through git ? On Tue, Feb 11, 2014 at 6:42 PM, Michael Reinsch
|
Timestamps do change when files are updated through git - but git does not try to preserve them. So when switching branches, there is a chance that all files are getting replaced and thus end up with a current timestamp. I think not bothering with the timestamps is the best way. If I run the command to update the pot/po files, I do expect it to actually do that. Anything else is confusing. If there is a reason to run it conditionally, that should be a different action like rake gettext:conditionally_update. |
Can you make a PR to change that, I'll merge it / don't expect anyone to On Tue, Feb 11, 2014 at 8:03 PM, Michael Reinsch
|
Let me see if I can find the time to do it. It's probably going to take some time as I'm not very familiar with the gettext internals. |
Is it the request in the pull request that If it is true, I'll add |
I think it has more to do with |
OK... It seems that I don't understand the problem discussed here... If there is a command line list to reproduce the problem discussed here, I may solve this. |
How to reproduce:
This will cause the locale files to not get regenerated. Note that I'm using So please do not rely on timestamps. If I run |
How about we make the example hack official then ? On Sun, Feb 23, 2014 at 7:00 AM, Michael Reinsch
|
Agreed. I can no longer get rake gettext:find to update the pot or po files. :( Additionally, specifying msgmerge or xgettext command line options (--add-location, etc) seems to always fail with invalid option. :( Edit: And, yes, git doesn't preserve timestamps. So, for instance, if you want to back out a local change to a file with get checkout, the timestamp is updated to now rendering gettext:find non-op. :/ |
can you make a PR ? |
You should not manage .pot file by Git. It is an auto generated file. If you don't manage .pot file by Git, your problem will be fixed. |
I've pulled in latest gettext from https://github.com/ruby-gettext/gettext to avoid fuzzy matching when updating po files and noticed that my pot file was no longer updated when running
rake gettext:find
. I couldn't pin this to any specific commit in gettext, but running gettext:pot:create upfront works fine for me.