Skip to content

Commit 2ae3d18

Browse files
authored
Merge pull request #17929 from craftcms/feature/translations
[6.x] Translations
2 parents 54d0698 + 11b15ca commit 2ae3d18

495 files changed

Lines changed: 9917 additions & 4363 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ ignore:
2929
- 'src/icons'
3030
- 'src/migrations'
3131
- 'src/test/internal'
32-
- 'src/translations'
3332
- 'src/views'
3433
- 'src/web/assets'
3534
- 'tests'

.gitattributes

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@
3838
/yii2-adapter export-ignore
3939

4040
# Identify generated files
41-
/src/translations/a*/app.php linguist-generated=true
42-
/src/translations/c*/app.php linguist-generated=true
43-
/src/translations/d*/app.php linguist-generated=true
44-
/src/translations/en-GB/app.php linguist-generated=true
45-
/src/translations/es/app.php linguist-generated=true
46-
/src/translations/f*/app.php linguist-generated=true
47-
/src/translations/h*/app.php linguist-generated=true
48-
/src/translations/i*/app.php linguist-generated=true
49-
/src/translations/j*/app.php linguist-generated=true
50-
/src/translations/k*/app.php linguist-generated=true
51-
/src/translations/n*/app.php linguist-generated=true
52-
/src/translations/p*/app.php linguist-generated=true
53-
/src/translations/r*/app.php linguist-generated=true
54-
/src/translations/s*/app.php linguist-generated=true
55-
/src/translations/t*/app.php linguist-generated=true
56-
/src/translations/z*/app.php linguist-generated=true
41+
/resources/translations/a*/app.php linguist-generated=true
42+
/resources/translations/c*/app.php linguist-generated=true
43+
/resources/translations/d*/app.php linguist-generated=true
44+
/resources/translations/en-GB/app.php linguist-generated=true
45+
/resources/translations/es/app.php linguist-generated=true
46+
/resources/translations/f*/app.php linguist-generated=true
47+
/resources/translations/h*/app.php linguist-generated=true
48+
/resources/translations/i*/app.php linguist-generated=true
49+
/resources/translations/j*/app.php linguist-generated=true
50+
/resources/translations/k*/app.php linguist-generated=true
51+
/resources/translations/n*/app.php linguist-generated=true
52+
/resources/translations/p*/app.php linguist-generated=true
53+
/resources/translations/r*/app.php linguist-generated=true
54+
/resources/translations/s*/app.php linguist-generated=true
55+
/resources/translations/t*/app.php linguist-generated=true
56+
/resources/translations/z*/app.php linguist-generated=true
5757
/src/web/assets/**/dist/**/*.css linguist-generated=true
5858
/src/web/assets/**/dist/**/*.css.map linguist-generated=true
5959
/src/web/assets/**/dist/**/*.min.js linguist-generated=true

.github/workflows/facades.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
CraftCms\\Cms\\Support\\Facades\\Announcements \
5959
CraftCms\\Cms\\Support\\Facades\\Deprecator \
6060
CraftCms\\Cms\\Support\\Facades\\Fields \
61+
CraftCms\\Cms\\Support\\Facades\\Lang \
6162
CraftCms\\Cms\\Support\\Facades\\ProjectConfig \
6263
CraftCms\\Cms\\Support\\Facades\\Updates
6364

CHANGELOG-WIP.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,14 @@ Moved the following controllers:
264264
- Deprecated `craft\services\SystemMessages`. `CraftCms\Cms\SystemMessage\SystemMessages` should be used instead.
265265
- Deprecated `craft\models\SystemMessage` and `craft\records\SystemMessage`. `CraftCms\Cms\SystemMessage\Models\SystemMessage` should be used instead.
266266
- Replaced `craft\controllers\SystemMessagesController` with `CraftCms\Cms\Http\Controllers\Utilities\SystemMessagesController`
267+
268+
## Translations
269+
270+
- Deprecated `craft\i18n\FormatConverter`. `CraftCms\Cms\Translation\FormatConverter` should be used instead.
271+
- Deprecated `craft\i18n\Formatter`. `CraftCms\Cms\Translation\Formatter` should be used instead.
272+
- Deprecated `craft\i18n\I18N`. `CraftCms\Cms\Translation\I18N` should be used instead.
273+
- Deprecated `craft\i18n\Locale`. `CraftCms\Cms\Translation\Locale` should be used instead.
274+
- Deprecated `craft\i18n\MessageFormatter`.
275+
- Deprecated `craft\i18n\PhpMessageSource`.
276+
- Deprecated `craft\i18n\Translation`. `CraftCms\Cms\Support\Facades\I18N` should be used instead.
277+
- Deprecated `Craft::t`. `CraftCms\Cms\t` should be used instead.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Once the VuePress dev server is up and running, you’ll be able to view the doc
6161

6262
We manage Craft’s Control Panel translations with [Crowdin](https://crowdin.com/project/craft-cms).
6363

64-
If you want to help improve Craft’s translations, [sign up to be a translator](https://crwd.in/craft-cms), or you can submit a pull request directly to the [src/translations/](https://github.com/craftcms/cms/tree/develop/src/translations) folder if you prefer.
64+
If you want to help improve Craft’s translations, [sign up to be a translator](https://crwd.in/craft-cms), or you can submit a pull request directly to the [resources/translations/](https://github.com/craftcms/cms/tree/develop/resources/translations) folder if you prefer.
6565

6666
## Core Enhancements
6767

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
"twig/twig": "~3.21.1",
6767
"web-auth/webauthn-lib": "~4.9.0",
6868
"webonyx/graphql-php": "~14.11.10",
69-
"yiisoft/html": "^3.11"
69+
"yiisoft/html": "^3.11",
70+
"yiisoft/translator": "^3.2",
71+
"yiisoft/translator-message-php": "^1.1"
7072
},
7173
"require-dev": {
7274
"dg/bypass-finals": "^1.9",

0 commit comments

Comments
 (0)