question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-completion for preferredDelimiter

See original GitHub issue

Describe the bug

We have the following resource file structure in our react native app: In <root_dir>/src/app:

├── l10n
│   └── locales
│       ├── cs
│       │   ├── common.cs.json
│       │   ├── invoice.cs.json
│       │   └── poChange.cs.json
│       ├── da
│       │   ├── common.da.json
│       │   ├── invoice.da.json
│       │   └── poChange.da.json
│       ├── de
│       │   ├── common.de.json
│       │   ├── invoice.de.json
│       │   └── poChange.de.json
│       ├── en-GB
│       │   ├── common.en-GB.json
│       │   ├── invoice.en-GB.json
│       │   └── poChange.en-GB.json
│       ├── en-US
│       │   ├── common.en-US.json
│       │   ├── invoice.en-US.json
│       │   └── poChange.en-US.json
. . .

where common is the default namespace, invoice, poChange are other namespaces.

I am using these VSCode settings:

  "i18n-ally.namespace": true,
  "i18n-ally.sourceLanguage": "en-US",
  "i18n-ally.displayLanguage": "en-US",
  "i18n-ally.localesPaths": "src/app/l10n/locales",
  "i18n-ally.pathMatcher": "{locale}/{namespace}.{locale}.json"

The file structure is not being recognized.

Screen Shot 2020-12-14 at 7 03 30 AM

Extension Version i18n Ally (v2.4.8)

Framework/i18n package you are using react-i18next

To Reproduce Steps to reproduce the behavior:

  1. Create react-native empty project with i18next, react-i18next set up
  2. Add directory structure described above
  3. Open I18N ALLY in the VSCode Explorer
  4. Observe that PROGRESS and TREE are empty and USAGE REPORT reports all keys missing

Device Infomation

  • OS: MacOS
  • Version: Catalina 10.15.6
  • VS Code Version: 1.52.0

Extension Log Go to View -> Output -> i18n Ally, and paste the content below. You should mask any sensitive information From the log, it looks to me that the "i18n-ally.localesPaths": "src/app/l10n/locales", setting doesn’t have any effect when filtering resource files.

🈶 Activated, v2.4.8

――――――

💼 Workspace root changed to "/Users/user_name/workspace/app_name"
📦 Packages file "package.json" found
🕳 Packages file "pubspec.yaml" not exists
🕳 Packages file "composer.json" not exists
📦 Packages file "Gemfile" found
🌞 Enabled
🧩 Enabled frameworks: React
🧬 Enabled parsers: json, yaml, json5

🚀 Initializing loader "/Users/user_name/workspace/app_name"
📂 Directory structure: dir
🗃 Custom Path Matcher: {locale}/{namespace}.{locale}.json
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\/(?<namespace>[^/\\]+)\.{locale}\.json$/

📂 Loading locales under /Users/user_name/workspace/app_name/coverage/lcov-report/l10n/locales

👀 Watching change on /Users/user_name/workspace/app_name/coverage/lcov-report/l10n/locales

📂 Loading locales under /Users/user_name/workspace/app_name/src/app/l10n/locales

👀 Watching change on /Users/user_name/workspace/app_name/src/app/l10n/locales

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/Flipper-Folly/folly/lang

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/Flipper-Folly/folly/lang

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/Folly/folly/lang

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/Folly/folly/lang

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/boost-for-react-native/boost/locale

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/boost-for-react-native/boost/locale

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/boost-for-react-native/boost/predef/language

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/boost-for-react-native/boost/predef/language

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/Headers/Private/Flipper-Folly/folly/lang

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/Headers/Private/Flipper-Folly/folly/lang

📂 Loading locales under /Users/user_name/workspace/app_name/ios/Pods/Headers/Public/Flipper-Folly/folly/lang

👀 Watching change on /Users/user_name/workspace/app_name/ios/Pods/Headers/Public/Flipper-Folly/folly/lang

📂 Loading locales under /Users/user_name/workspace/app_name/android/app/src/main/java/com/comp/android/compmobile/core/ui/messages

👀 Watching change on /Users/user_name/workspace/app_name/android/app/src/main/java/com/comp/android/compmobile/core/ui/messages

📂 Loading locales under /Users/user_name/workspace/app_name/android/app/bin/src/main/java/com/comp/android/compmobile/core/ui/messages

👀 Watching change on /Users/user_name/workspace/app_name/android/app/bin/src/main/java/com/comp/android/compmobile/core/ui/messages
✅ Loading finished


――――――


Screenshots (pasted above in the Decription section)

Thank you for your time!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
antfucommented, Dec 16, 2020

For : to get support, you need to have i18next framework enabled as well

"i18n-ally.enabledFrameworks": ["i18next", "react"]
4reactions
ghostcommented, Oct 18, 2021

@terales @antfu Is this issue going to be addressed? I am running into the same issue that @dudeinthemirror is facing. The keys translate fine in the editor but when inserting the key it uses an . instead of :

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto-completion for preferredDelimiter · Issue #443 - GitHub
Describe the bug We have the following resource file structure in our react native app: In /src/app: ├── l10n │ └── locales ...
Read more >
Auto-completion for preferredDelimiter - Bountysource
Describe the bug. We have the following resource file structure in our react native app: In <root_dir>/src/app :
Read more >
How to Convert Date to Month and Year in Excel
... results of the MONTH and the YEAR functions with our preferred delimiter. ... How to Autofill Dates in Excel (Autofill Days, Weekdays,...
Read more >
CloudMiner Yearly Subscription - Rite Software
Export data to PDF/Excel/RTF or your preferred delimiter. Powerful search capability across all ... Smart code editor with context-aware auto-completion
Read more >
Autocomplete for Java Command Line Applications - Picocli
Picocli can generate an autocompletion script tailored to your application. With this script installed, users can type the first few letters ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found