Skip to content

Commit

Permalink
feat: add inlang
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseRFelix committed Jan 8, 2024
1 parent bddba61 commit daae88f
Show file tree
Hide file tree
Showing 17 changed files with 147 additions and 4 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions cms/top-announcement-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"$schema": "../schemas/top-announcement-banner.schema.json",
"isChainHalted": false,
"banner": {
"enTextOrLocalizationPath": "This is a test of the top announcement banner.",
"enTextOrLocalizationPath": "topAnnouncementBanner.title",
"link": {
"enTextOrLocalizationKey": "Click here to learn more.",
"enTextOrLocalizationKey": "topAnnouncementBanner.linkLearnMore",
"isExternal": true,
"url": "https://www.google.com"
},
Expand Down
6 changes: 6 additions & 0 deletions localizations/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Testing!",
"linkLearnMore": "Click here to learn more."
}
}
6 changes: 6 additions & 0 deletions localizations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "¡Pruebas!",
"linkLearnMore": "Clic aquí para saber más."
}
}
6 changes: 6 additions & 0 deletions localizations/fa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "آزمایش کردن!",
"linkLearnMore": "برای اطلاعات بیشتر اینجا کلیک کنید."
}
}
6 changes: 6 additions & 0 deletions localizations/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Essai!",
"linkLearnMore": "Cliquez ici pour en savoir plus."
}
}
6 changes: 6 additions & 0 deletions localizations/ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "테스트!",
"linkLearnMore": "자세한 내용을 보려면 여기를 클릭하세요."
}
}
6 changes: 6 additions & 0 deletions localizations/pl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Testowanie!",
"linkLearnMore": "Kliknij tutaj, aby dowiedzieć się więcej."
}
}
6 changes: 6 additions & 0 deletions localizations/pt-br.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Testando!",
"linkLearnMore": "Clique aqui para saber mais."
}
}
6 changes: 6 additions & 0 deletions localizations/ro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Testare!",
"linkLearnMore": "Apasa aici pentru a afla mai multe."
}
}
6 changes: 6 additions & 0 deletions localizations/tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "Test yapmak!",
"linkLearnMore": "Daha fazlasını öğrenmek için buraya tıklayın."
}
}
6 changes: 6 additions & 0 deletions localizations/zh-cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "测试!",
"linkLearnMore": "点击这里了解更多。"
}
}
6 changes: 6 additions & 0 deletions localizations/zh-hk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "測試!",
"linkLearnMore": "點這裡了解更多。"
}
}
6 changes: 6 additions & 0 deletions localizations/zh-tw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topAnnouncementBanner": {
"title": "測試!",
"linkLearnMore": "點這裡了解更多。"
}
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "vitest"
"test": "vitest",
"machine-translate": "inlang machine translate --project ./project.inlang"
},
"keywords": [],
"author": "",
Expand All @@ -13,6 +14,7 @@
"ajv": "^8.12.0",
"ajv-cli": "^5.0.0",
"ajv-formats": "^2.1.1",
"vitest": "^1.1.3"
"vitest": "^1.1.3",
"@inlang/cli": "^2.0.0"
}
}
28 changes: 28 additions & 0 deletions project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": [
"en",
"es",
"fa",
"fr",
"ko",
"pl",
"pt-br",
"ro",
"tr",
"zh-cn",
"zh-hk",
"zh-tw"
],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-json@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@1/dist/index.js"
],
"plugin.inlang.json": {
"pathPattern": "./localizations/{languageTag}.json"
}
}
41 changes: 41 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04"
integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==

"@inlang/cli@^2.0.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@inlang/cli/-/cli-2.4.0.tgz#271e9201083e938a9563610e9416c3170c87e261"
integrity sha512-7Ev0x0w/S+PJlHyLC2RPRQNHppaU9ZxGKqtCm8jFplXqFxrlL7uU3z5+cyRM6u1jthd3smx1D0PlYcCJW9tU1Q==
dependencies:
esbuild-wasm "^0.19.2"
fs-extra "11.1.1"

"@jest/schemas@^29.6.3":
version "29.6.3"
resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
Expand Down Expand Up @@ -376,6 +384,11 @@ diff-sequences@^29.6.3:
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==

esbuild-wasm@^0.19.2:
version "0.19.11"
resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.19.11.tgz#4ed96cdd1a289bc08432a25fd38b7331d3eac98d"
integrity sha512-MIhnpc1TxERUHomteO/ZZHp+kUawGEc03D/8vMHGzffLvbFLeDe6mwxqEZwlqBNY7SLWbyp6bBQAcCen8+wpjQ==

esbuild@^0.19.3:
version "0.19.11"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.11.tgz#4a02dca031e768b5556606e1b468fe72e3325d96"
Expand Down Expand Up @@ -449,6 +462,15 @@ fast-json-patch@^2.0.0:
dependencies:
fast-deep-equal "^2.0.1"

[email protected]:
version "11.1.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d"
integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
Expand Down Expand Up @@ -481,6 +503,11 @@ glob@^7.1.0:
once "^1.3.0"
path-is-absolute "^1.0.0"

graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

human-signals@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28"
Expand Down Expand Up @@ -539,6 +566,15 @@ jsonc-parser@^3.2.0:
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==

jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"

local-pkg@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c"
Expand Down Expand Up @@ -804,6 +840,11 @@ ufo@^1.3.0:
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.2.tgz#c7d719d0628a1c80c006d2240e0d169f6e3c0496"
integrity sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==

universalify@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==

uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
Expand Down

0 comments on commit daae88f

Please sign in to comment.