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

[Framework Request] Yii2 Framwork #1204

Open
terranc opened this issue Sep 14, 2024 · 1 comment
Open

[Framework Request] Yii2 Framwork #1204

terranc opened this issue Sep 14, 2024 · 1 comment

Comments

@terranc
Copy link

terranc commented Sep 14, 2024

What framework do you want to have? Please provide links of its i18n solution/package.
https://www.yiiframework.com/doc/guide/2.0/zh-cn/tutorial-i18n

Please provide some overall screenshots about how the i18n usage would be like

// first param is namespace
Yii::t('yii', 'login error');

Additional context
I am now trying to use the custom mode,The contents of .vscode/i18n-ally-custom-framework.yml are as follows:

languageIds:
  - php

usageMatchRegex:
  - "(?:Yii)\\:\\:t\\(\\s*['\"]({namespace})['\"]\\s*,\\s*['\"]({key})['\"]"

monopoly: true

workspace settings:

{
"i18n-ally.displayLanguage": "zh-CN",
  "i18n-ally.enabledParsers": [
    "php"
  ],
  "i18n-ally.sourceLanguage": "en",
  "i18n-ally.namespace": false,
  "i18n-ally.keepFulfilled": true,
  "i18n-ally.localeCountryMap": {
    "en": "en",
    "zh": "zh-CN"
  },
  "i18n-ally.keyMatchRegex": ".*?",
  "i18n-ally.localesPaths": [
    "common/messages",
    "vendor/yiisoft/yii2/messages"
  ],
  "i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
  "i18n-ally.annotationInPlace": false,
  "i18n-ally.extract.autoDetect": false,
  "i18n-ally.frameworks.ruby-rails.scopeRoot": "",
  "i18n-ally.fullReloadOnChanged": false,
  "i18n-ally.indent": 4,
  "i18n-ally.enabledFrameworks": [
    "custom"
  ],
  "i18n-ally.disablePathParsing": false,
  "i18n-ally.translate.fallbackToKey": true,
  "i18n-ally.regex.usageMatch": [
    "(?:Yii)\\:\\:t\\(\\s*['\"]({namespace})['\"]\\s*,\\s*['\"]({key})['\"]"
  ],
  "i18n-ally.dirStructure": "auto",
  "i18n-ally.annotationDelimiter": ".",
  "i18n-ally.keystyle": "nested",
  "i18n-ally.autoDetection": true,
  "i18n-ally.parsers.extendFileExtensions": [
    "php"
  ],
  "i18n-ally.showFlags": true,
  "i18n-ally.review.enabled": false,
  "i18n-ally.review.gutters": false
}

In this scenario, the code in the application does not display the language configured in displayLanguage

@terranc
Copy link
Author

terranc commented Sep 14, 2024

image

The language pack information can be read correctly in the sidebar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant