-
Notifications
You must be signed in to change notification settings - Fork 377
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
fix(extract): when files are used, don't overwrite obsolete #1964
base: main
Are you sure you want to change the base?
fix(extract): when files are used, don't overwrite obsolete #1964
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
@nicolas-cherel thanks for the contribution! Please include tests that cover this use case |
i would recommend to add full e2e test here
|
8b62282
to
2209e41
Compare
Note: it seem that only the lingui json format has support for the obsolete flag, I hope depending on it for the tests is not a issue |
Po files also support obsolete, i would prefer to have it with PO files, lingui json format is not recommended to use by docs. |
Ok I must have missed something on my first pass, I'll get right away now that I have the json version set up |
2209e41
to
9d200c8
Compare
Ok, note, we previously had an issue specific to the json files where a I renamed the test suite fixtures/exisiting/expected folder to |
9d200c8
to
2317d95
Compare
re-pushed for a typo fix on |
2317d95
to
9487dbf
Compare
if (glob.sync(existingPath).length === 1) { | ||
await fs.cp(existingPath, actualPath, { recursive: true }) | ||
} | ||
|
||
return { rootDir, actualPath, existingPath, expectedPath } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since now its implemented for all test cases, remove
await fs.cp(
nodepath.join(rootDir, "existing"),
nodepath.join(rootDir, "actual"),
{ recursive: true }
)
from this spec:
it("should extract and clean obsolete",
@nicolas-cherel could you please address the discussion above? |
sorry, I was not available on july, and forgot to get back to the issue, I'll try to do it ASAP |
Description
When using
lingui extract <...files>
all translations in catalog that are not in the listed file get their obsolete flag to false, regardless if the obsolete flag was not set or already set to true.Types of changes
Fixes # (issue)
#1963
Checklist