-
Notifications
You must be signed in to change notification settings - Fork 86
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
If changes to .po
file are discarded (accidentally), they're not added back
#377
Comments
@maennchen heyo, you have any time to look at this by any chance? This week I won't, but I might do a cycle on Gettext next week if you're busy 🙃 |
@whatyouhide I just got a big task in and not much time until the deadline. I can have a look next week the earliest as well. |
I had a look at the issue and I think this is working as intended:
|
Thank you for investigating the issue. So I assume we can't do anything about the above scenario? If so we can close the issue |
We could change the behavior to always merge even if the |
@maennchen yeah that's an easy way out and worth a try I think 👍 |
@maennchen are you going to work on this by any chance? |
@whatyouhide I‘m also a bit busy at the moment. So I wasn’t planning to soon. |
@whatyouhide I looked quickly how this could be implemented. Currently we remove unchanged files from the list in gettext/lib/gettext/extractor.ex Line 225 in e7a2c2e
The In conclusion I think we either have to change the How would you want to implement this? |
@maennchen what would the extra arguments for the |
@whatyouhide The path to the But this feels quite hacky since theoretically |
I re-read this issue all over again to regain context. What we're doing right now makes sense to me, because extract is about extraction and not merging. I think if you run However, I think the intent of |
@whatyouhide That is correct. It would be trivial to implement if |
@maennchen |
@whatyouhide Oh, oops. I overlooked the Easy fix then :) |
@maennchen I'd like to release 1.0 around the end of the year/start of new year, so let's not release a new version with this change and let's wait for 1.0 direclty. |
@whatyouhide I think it would make sense to tackle the umbrella issue before releasing a 1.0 eince that could potentially create larger problems / changes. |
How to reproduce:
https://github.com/saveman71/gettext-repro-cases/tree/missing-po-if-checked-out
In
gettext_mwe.ex
, add a secondgettext
call to thegettext
function:Run
mix gettext.extract --merge
and observe that bothpo
andpot
files are updated.Run
git checkout -- priv/gettext/fr/LC_MESSAGES/default.po
to "accidentally" reset thepo
file.Run
mix gettext.extract --merge
and observe that nothing is updated.From that point on, if you commit and push, gettext won't catch the new strings until the code is modified.
Expected behaviour
If you change/discard the changes to
default.pot
, gettext will overwrite your changes based on what's found.I expect the same thing if I change/discard changes in
default.po
.The text was updated successfully, but these errors were encountered: