Skip to content

Commit

Permalink
feat: add italian (#70)
Browse files Browse the repository at this point in the history
* feat: add italian

* ci: add build workflow
  • Loading branch information
pyphilia authored Nov 17, 2022
1 parent 5fd0ab2 commit 8511e97
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

# Control when the action will run
on:
push:

jobs:
build:
name: Build
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
# Check-out repository under $GITHUB_WORKSPACE, so the job can access it
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}

- name: Setup node
id: setup-node
uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true

- name: Yarn install and Cache dependencies
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1

- name: Yarn build
run: yarn build
5 changes: 3 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import i18n from 'i18next';
import { en, fr, de, namespaces } from './langs';
import { en, fr, de, it, namespaces } from './langs';

export const DEFAULT_LANG = 'en';

Expand All @@ -9,6 +9,7 @@ const buildI18n = (defaultNamespace = namespaces.messages) => {
en,
fr,
de,
it,
},
lng: DEFAULT_LANG,
fallbackLng: DEFAULT_LANG,
Expand Down Expand Up @@ -40,7 +41,7 @@ const langs = {
// fi: "Suomi",
fr: 'Français',
// hu: "Magyar",
// it: "Italiano",
it: 'Italiano',
// ja: '日本語',
// ka: "ქართული",
// lt: "lietuvių kalba",
Expand Down
1 change: 1 addition & 0 deletions src/langs/de/association.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
35 changes: 34 additions & 1 deletion src/langs/index.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@
import messagesEN from './en/messages.json';
import messagesFR from './fr/messages.json';
import messagesDE from './de/messages.json';
import messagesIT from './it/messages.json';
import chatboxEN from './en/chatbox.json';
import chatboxFR from './fr/chatbox.json';
import chatboxDE from './de/chatbox.json';
import chatboxIT from './it/chatbox.json';
import authEN from './en/auth.json';
import authFR from './fr/auth.json';
import authDE from './de/auth.json';
import authIT from './it/auth.json';
import libraryEN from './en/library.json';
import libraryFR from './fr/library.json';
import libraryDE from './de/library.json';
import libraryIT from './it/library.json';
import categoriesEN from './en/categories.json';
import categoriesFR from './fr/categories.json';
import categoriesDE from './de/categories.json';
import categoriesIT from './it/categories.json';
import builderEN from './en/builder.json';
import builderFR from './fr/builder.json';
import builderDE from './de/builder.json';
import builderIT from './it/builder.json';
import commonEN from './en/common.json';
import commonFR from './fr/common.json';
import commonDE from './de/common.json';
import commonIT from './it/common.json';
import accountEN from './en/account.json';
import accountFR from './fr/account.json';
import accountDE from './de/account.json';
import accountIT from './it/account.json';
import permissionLevelEN from './en/permissionLevel.json';
import permissionLevelFR from './fr/permissionLevel.json';
import permissionLevelDE from './de/permissionLevel.json';
import permissionLevelIT from './it/permissionLevel.json';
import itemTypeEN from './en/itemType.json';
import itemTypeFR from './fr/itemType.json';
import itemTypeDE from './de/itemType.json';
import itemTypeIT from './it/itemType.json';
import contextEN from './en/context.json';
import contextFR from './fr/context.json';
import contextDE from './de/context.json';
import contextIT from './it/context.json';
import uppyEN from './en/uppy.json';
import uppyFR from './fr/uppy.json';
import uppyDE from './de/uppy.json';
import uppyIT from './it/uppy.json';
import associationEN from './en/association.json';
import associationFR from './fr/association.json';
import associationDE from './de/association.json';
import associationIT from './it/association.json';

// define namespaces
export const namespaces = {
Expand Down Expand Up @@ -90,6 +104,7 @@ const fr = {

const de = {
[namespaces.account]: accountDE,
[namespaces.association]: associationDE,
[namespaces.auth]: authDE,
[namespaces.builder]: builderDE,
[namespaces.categories]: categoriesDE,
Expand All @@ -105,5 +120,23 @@ const de = {
[namespaces.uppy]: uppyDE,
};

const it = {
[namespaces.account]: accountIT,
[namespaces.association]: associationIT,
[namespaces.auth]: authIT,
[namespaces.builder]: builderIT,
[namespaces.categories]: categoriesIT,
[namespaces.chatbox]: chatboxIT,
[namespaces.common]: commonIT,
[namespaces.enums]: {
...permissionLevelIT,
...itemTypeIT,
...contextIT,
},
[namespaces.library]: libraryIT,
[namespaces.messages]: messagesIT,
[namespaces.uppy]: uppyIT,
};

// other supported languages here
export { en, fr, de };
export { en, fr, de, it };
1 change: 1 addition & 0 deletions src/langs/it/account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/association.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/auth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/categories.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/chatbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/itemType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/permissionLevel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions src/langs/it/uppy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 8511e97

Please sign in to comment.