Skip to content

Commit

Permalink
chore: add keys extraction check
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Apr 4, 2023
1 parent 2fdcf99 commit ddfff41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -278,6 +278,10 @@ jobs:
run: npm run eslint
working-directory: ./webapp

- name: Keys extraction check
run: npm run check-translations
working-directory: ./webapp

- name: Load newest translations
run: npm run load-translations
working-directory: ./webapp
Expand Down
3 changes: 2 additions & 1 deletion webapp/package.json
Expand Up @@ -69,7 +69,8 @@
"eslint": "eslint --ext .ts --ext .tsx --max-warnings 0 --report-unused-disable-directives .",
"tsc": "tsc",
"tsc:prod": "tsc --project tsconfig.prod.json",
"load-translations": "tolgee pull ./src/i18n -o"
"load-translations": "tolgee pull ./src/i18n -o",
"check-translations": "tolgee extract check './src/**/*.ts?(x)'"
},
"eslintConfig": {
"extends": [
Expand Down
4 changes: 3 additions & 1 deletion webapp/src/views/userSettings/pats/PatsView.tsx
Expand Up @@ -37,11 +37,13 @@ export const PatsView: FunctionComponent = () => {
pat: null as components['schemas']['RevealedPatModel'] | null,
});

const test = 'pats_view';

return (
<>
<BaseUserSettingsView
windowTitle={t('pats_title')}
title={t('pats_title')}
title={t(test)}

Check warning on line 46 in webapp/src/views/userSettings/pats/PatsView.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Dynamic key

The key not static and cannot be extracted automatically. This key will be ignored. Use @​tolgee-key or @​tolgee-ignore to suppress this warning.
loading={list.isFetching}
navigation={[[t('user_menu_pats'), LINKS.USER_PATS.build()]]}
hideChildrenOnLoading={false}
Expand Down

0 comments on commit ddfff41

Please sign in to comment.