Comments (17)
@whatyouhide Oh, oops. I overlooked the @moduledoc false
.
Easy fix then :)
from gettext.
@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.
from gettext.
I had a look at the issue and I think this is working as intended:
mix gettext.merge
merges.pot
=>.po
mix gettext.extract --merge
does the extraction and only applies the merge for the files that changed in the extraction
from gettext.
@whatyouhide I‘m also a bit busy at the moment. So I wasn’t planning to soon.
from gettext.
@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 🙃
from gettext.
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
from gettext.
We could change the behavior to always merge even if the .pot
is unchanged. I'm not sure though if we should.
What do you think @whatyouhide?
from gettext.
@maennchen yeah that's an easy way out and worth a try I think 👍
from gettext.
@maennchen are you going to work on this by any chance?
from gettext.
@whatyouhide I looked quickly how this could be implemented.
Currently we remove unchanged files from the list in Extractor.pot_files/2
:
gettext/lib/gettext/extractor.ex
Line 225 in e7a2c2e
The gettext.extract
task does not take the priv directory path as gettext.merge
does.
In conclusion I think we either have to change the Extractor.pot_files/2
function (add option to include unchanged or a breaking change) or we have to take extra arguments for the gettext.extract
mix task.
How would you want to implement this?
from gettext.
@maennchen what would the extra arguments for the gettext.extract
task be?
from gettext.
@whatyouhide The path to the .pot
files as in gettext.merge
.
But this feels quite hacky since theoretically gettext.extract
could extract for multiple Gettext
modules and could therefore have multiple paths.
from gettext.
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 mix gettext.merge
, then we still update the .po
file that was changed.
However, I think the intent of mix gettext.extract --merge
was to essentially mimic gettext.extract
+ gettext.merge
. In that case, we'll want mix gettext.extract --merge
to also override the .po
files, even if the POT files were unchanged. Wdyt?
from gettext.
@whatyouhide That is correct.
It would be trivial to implement if Extractor.pot_files/2
would return [{"path1.pot", :changed, "contents..."}, {"path2.pot", :unchanged, "contents..."}]
instead of just [{"path1.pot", "contents..."}]
.
from gettext.
@maennchen Extractor.pot_files/2
is not public, so we can change it to return [{path, :changed, contents}, ...]
right?
from gettext.
@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.
from gettext.
@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.
from gettext.
Related Issues (20)
- check-up-to-date fails even though files are just extracted HOT 8
- Flaky test in `gettext.extract`
- Duplicate Filename in Reference when `:write_reference_line_numbers` is set to `false`
- Gettext.PluralFormError for plural form "1" in "ja" locale HOT 9
- `gettext.merge` FunctionClauseError HOT 4
- Module is not loaded because :nofile HOT 4
- Mention file path in plural forms deprecation warning HOT 4
- Plural Forms warning occurs in newly generated language file HOT 2
- bump a new version for #359 HOT 1
- Duplicate msgid with singular and plural form HOT 5
- Running `mix gettext.extract` doesn't extract new messages with Elixir 1.15 HOT 2
- Retain custom flags during merge HOT 3
- Interpolation option set but not working HOT 4
- Duplicate references in POT files and warnings about redefining modules HOT 5
- compile depend excoveralls - origin/httpc failed HOT 1
- Add `Gettext.example` macro HOT 6
- Allow to transform messages at compile time HOT 3
- `expo.msguniq` merges translations with different plurals HOT 4
- Locale changes between static mount and liveview HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gettext.