-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add inlang * feat: add script to add translations inline * feat: add workflow to push inline localization * fix: correct branch name * fix: workflow condition * feat: add push event to inline localization * fix: naming * feat: remove localization form top-announcement banner * Apply automatic changes * improvement: better automated commit message * test: remove localization * Add inline translations * Add inline translations * feat: add fake banner * fix: translation key * feat: add swap banners translations * Add inline translations * feat: replace headers and subheaders with translations keys * feat: make swap rotating banner properties camelCase * feat: inline-translations in json file * Add inline translations * improvement: remove localizations folder * improvement: remove unused command * improvement: readme * Add inline translations * improvement: re-add top announcement banner test * Add inline translations * feat: do not overwrite existing properties * Add inline translations * feat: do not create localization object automatically --------- Co-authored-by: JoseRFelix <[email protected]>
- Loading branch information
1 parent
473a360
commit ff74647
Showing
12 changed files
with
551 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Push a new commit with inline translations on cms files | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
commit-inline-translations: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Add inline translations | ||
run: yarn inline-translations | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Add inline translations" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
project.inlang/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### FE Content | ||
|
||
This repository serves as a Content Management System (CMS) for the [Osmosis Frontend](https://github.com/osmosis-labs/osmosis-frontend). | ||
|
||
#### Translation | ||
|
||
The content in this repository is available in various languages, with translations automatically handled by inlang. Follow these steps to translate content: | ||
|
||
1. Add an English translation in the CMS file under the localization property by inserting an "en" key. | ||
Example: | ||
```json | ||
"localization": { | ||
"en": {} | ||
} | ||
``` | ||
2. After committing and pushing changes to a branch, the CI process will automatically add the translations to the same branch. | ||
3. To manually handle translations, execute the command `yarn inline-translations`. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,53 @@ | ||
{ | ||
"$schema": "../schemas/top-announcement-banner.schema.json", | ||
"isChainHalted": false, | ||
"banner": null | ||
"banner": { | ||
"enTextOrLocalizationPath": "title", | ||
"link": { | ||
"enTextOrLocalizationKey": "linkLearnMore", | ||
"isExternal": true, | ||
"url": "https://www.google.com" | ||
}, | ||
"localStorageKey": "top-announcement-banner-test", | ||
"startDate": "2024-01-08T00:00:00.000Z", | ||
"endDate": "2024-02-01T00:00:00.000Z" | ||
}, | ||
"localization": { | ||
"en": { "title": "Testing!", "linkLearnMore": "Click here to learn more." }, | ||
"es": { | ||
"title": "¡Pruebas!", | ||
"linkLearnMore": "Clic aquí para saber más." | ||
}, | ||
"fa": { | ||
"title": "آزمایش کردن!", | ||
"linkLearnMore": "برای اطلاعات بیشتر اینجا کلیک کنید." | ||
}, | ||
"fr": { | ||
"title": "Essai!", | ||
"linkLearnMore": "Cliquez ici pour en savoir plus." | ||
}, | ||
"ko": { | ||
"title": "테스트!", | ||
"linkLearnMore": "자세한 내용을 보려면 여기를 클릭하세요." | ||
}, | ||
"pl": { | ||
"title": "Testowanie!", | ||
"linkLearnMore": "Kliknij tutaj, aby dowiedzieć się więcej." | ||
}, | ||
"pt-br": { | ||
"title": "Testando!", | ||
"linkLearnMore": "Clique aqui para saber mais." | ||
}, | ||
"ro": { | ||
"title": "Testare!", | ||
"linkLearnMore": "Apasa aici pentru a afla mai multe." | ||
}, | ||
"tr": { | ||
"title": "Test yapmak!", | ||
"linkLearnMore": "Daha fazlasını öğrenmek için buraya tıklayın." | ||
}, | ||
"zh-cn": { "title": "测试!", "linkLearnMore": "点击这里了解更多。" }, | ||
"zh-hk": { "title": "測試!", "linkLearnMore": "點這裡了解更多。" }, | ||
"zh-tw": { "title": "測試!", "linkLearnMore": "點這裡了解更多。" } | ||
} | ||
} |
Oops, something went wrong.