Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2661 - Translation System - JSON files #4026

Merged
merged 8 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/i18n/i18nFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import { TFunction } from 'i18next'

import { Lang } from 'meta/lang'

import * as arTranslation from './resources/ar'
import * as enTranslation from './resources/en'
import * as esTranslation from './resources/es'
import * as frTranslation from './resources/fr'
import * as ruTranslation from './resources/ru'
import * as zhTranslation from './resources/zh'
import { arTranslation } from './resources/ar'
import { enTranslation } from './resources/en'
import { esTranslation } from './resources/es'
import { frTranslation } from './resources/fr'
import { ruTranslation } from './resources/ru'
import { zhTranslation } from './resources/zh'

// @ts-ignore
const createInstance = i18next.createInstance || i18next.default.createInstance

const translationsFiles: { [langCode: string]: any } = {
en: enTranslation.translation,
es: esTranslation.translation,
fr: frTranslation.translation,
ru: ruTranslation.translation,
ar: arTranslation.translation,
zh: zhTranslation.translation,
en: enTranslation,
es: esTranslation,
fr: frTranslation,
ru: ruTranslation,
ar: arTranslation,
zh: zhTranslation,
}

export const createParams = (lang: string) => ({
Expand Down
46 changes: 0 additions & 46 deletions src/i18n/resources/ar.js

This file was deleted.

46 changes: 46 additions & 0 deletions src/i18n/resources/ar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import * as admin from './ar/admin.json'
import * as area from './ar/area.json'
import * as assessmentSection from './ar/assessmentSection.json'
import * as common from './ar/common.json'
import * as contentCheck from './ar/contentCheck.json'
import * as dataDownload from './ar/dataDownload.json'
import * as dataSource from './ar/dataSource.json'
import * as editUser from './ar/editUser.json'
import * as email from './ar/email.json'
import * as fra from './ar/fra.json'
import * as generalValidation from './ar/generalValidation.json'
import * as geo from './ar/geo.json'
import * as history from './ar/history.json'
import * as landing from './ar/landing.json'
import * as login from './ar/login.json'
import * as nationalDataPoint from './ar/nationalDataPoint.json'
import * as other from './ar/other.json'
import * as statisticalFactsheets from './ar/statisticalFactsheets.json'
import * as uc from './ar/uc.json'

export const arTranslation = {
admin,
area,
common,
contentCheck,
dataDownload,
dataSource,
editUser,
email,
fra,
generalValidation,
geo,
history,
landing,
login,
nationalDataPoint,

page: {
assessmentSection,
},

statisticalFactsheets,
uc,

...other,
}
13 changes: 0 additions & 13 deletions src/i18n/resources/ar/admin.js

This file was deleted.

13 changes: 13 additions & 0 deletions src/i18n/resources/ar/admin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"admin": "المدير",
"enotfound": "خطأ في نظام أسماء النطاقات",
"filter": "غربلة وفق",
"invitationPending": "تعليق الدعوة",
"invitationsAcceptedCount": "عدد الدعوات المقبولة",
"invitationsSentCount": "عدد الدعوات المرسلة",
"lastStatus": "آخر تحديث",
"locationsCount": "عدد المواقع",
"urlParsingError": "خطأ في التوصل إلى عنوان الموقع",
"usersCount": "عدد المستخدمين",
"verifyLinks": "التحقق من الروابط"
}
Loading
Loading