-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
74 additions
and
25 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 |
---|---|---|
|
@@ -20,14 +20,15 @@ jobs: | |
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build the CLI | ||
run: npm run build | ||
- name: Run npm release | ||
run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_AUTHOR_NAME: Tolgee Machine | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: Tolgee Machine | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
# We need to get ready for this first! | ||
# - name: Build the CLI | ||
# run: npm run build | ||
# - name: Run npm release | ||
# run: npm run release | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# GIT_AUTHOR_NAME: Tolgee Machine | ||
# GIT_AUTHOR_EMAIL: [email protected] | ||
# GIT_COMMITTER_NAME: Tolgee Machine | ||
# GIT_COMMITTER_EMAIL: [email protected] |
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 |
---|---|---|
|
@@ -21,17 +21,20 @@ jobs: | |
with: | ||
path: ~/.npm | ||
key: cache-node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build the CLI | ||
run: npm run build | ||
- name: Run npm release | ||
run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_AUTHOR_NAME: Tolgee Machine | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: Tolgee Machine | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
|
||
# We need to get ready for this firs! | ||
# - name: Run npm release | ||
# run: npm run release | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# GIT_AUTHOR_NAME: Tolgee Machine | ||
# GIT_AUTHOR_EMAIL: [email protected] | ||
# GIT_COMMITTER_NAME: Tolgee Machine | ||
# GIT_COMMITTER_EMAIL: [email protected] |
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 @@ | ||
## Tolgee AI i18n migrator | ||
|
||
This tool is used to migrate your app code from raw string to use Tolgee SDKs, so you can manage | ||
your localization effectively with Tolgee. | ||
|
||
## Motivation | ||
|
||
Although we still recommend to prepare your project for localization from the beginning, the reality | ||
is that many developers start with raw strings and then decide to localize their app. | ||
|
||
This tool is here to help you with this process. It will scan your project for raw strings and | ||
replace them with Tolgee SDK calls. | ||
|
||
e.g. for React, it will replace: | ||
```typescript jsx | ||
export const WelcomeMessage = () => { | ||
return <div>Welcome!</div>; | ||
}; | ||
``` | ||
|
||
with: | ||
```typescript jsx | ||
import { T } from '@tolgee/react'; | ||
export const WelcomeMessage = () => { | ||
return <div><T keyName="welcome-message" /></div> | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
1. Install the tool globally: | ||
```bash | ||
npm install -g @tolgee/ai-migrator | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const PasswordField = () => { | ||
return <input placeholder="New Password" />; | ||
return <input placeholder="New password" />; | ||
}; |
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