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

"i18n-ally.keepFulfilled: true" never applies to the key just added with "Edit translation" from the editor #581

Closed
TobiasWehrum opened this issue Jun 2, 2021 · 0 comments
Assignees
Labels
bug Something isn't working sp:21

Comments

@TobiasWehrum
Copy link

TobiasWehrum commented Jun 2, 2021

Describe the bug
When I add a key via "Edit translation" from e.g. t("some_new_key") in a .ts or .tsx file, i18n-ally will keep all previously added keys (e.g. from the last "Edit translation" or from manually editing my de.json file) fulfilled across translation.json files, but not the new some_new_key from the example.

Extension Version
i18n Ally v2.6.1

Framework/i18n package you are using
react-i18next

To Reproduce
Steps to reproduce the behavior:

  1. Have a project with at least two translation files (e.g. de.json and fr.json) and "i18n-ally.keepFulfilled": true.
  2. Open a ts/tsx file.
  3. Type t("some_new_key")
  4. Right-click on "some_new_key"
  5. Select "Edit translation"
  6. Enter a new translation for your default language (e.g. de in my case) like "This is a nice key"
  7. Press Enter
  8. See that "some_new_key" is added to de.json, but not to fr.json

Repeat with e.g. "some_other_new_key" to see "some_new_key" is now added to fr.json after step 7, but not "some_other_new_key".

Device Infomation

  • OS: Windows
  • Version: 10
  • VS Code Version: 1.56.2

Extension Log

🈶 Activated, v2.6.1

――――――

💼 Workspace root changed to "d:\dev\Projekte\Web\Node\work\project-name"
📦 Packages file "package.json" found
🕳 Packages file "pubspec.yaml" not exists
🕳 Packages file "composer.json" not exists
🕳 Packages file "Gemfile" not exists
🌞 Enabled
🧩 Enabled frameworks: React, General
🧬 Enabled parsers: json, yaml, json5

🚀 Initializing loader "d:\dev\Projekte\Web\Node\work\project-name"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\.(?<ext>json|ya?ml|json5)$/

📂 Loading locales under d:\dev\Projekte\Web\Node\work\project-name\assets\locales
	📑 Loading (de) de.json [1622674382894.3782]
	📑 Loading (en) en.json [1622674382893.3772]

👀 Watching change on d:\dev\Projekte\Web\Node\work\project-name\assets\locales
✅ Loading finished


――――――

💾 Writing d:\dev\Projekte\Web\Node\work\project-name\assets\locales\en.json
💾 Writing d:\dev\Projekte\Web\Node\work\project-name\assets\locales\de.json
✅ Loading finished

🔄 File changed (change) en.json
	📑 Loading (en) en.json [1622674839378.2627]
🔄 File changed (change) de.json
✅ Loading finished

	📑 Loading (de) de.json [1622674839379.263]
✅ Loading finished
@TobiasWehrum TobiasWehrum added the bug Something isn't working label Jun 2, 2021
@terales terales added the sp:21 label Jul 7, 2021
@terales terales added this to the Weekly cycle 022 milestone Jul 28, 2021
@terales terales assigned terales and antfu and unassigned terales Jul 28, 2021
@antfu antfu closed this as completed in a3029c5 Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sp:21
Development

No branches or pull requests

3 participants