Skip to content

Commit

Permalink
🌐 All translation files done
Browse files Browse the repository at this point in the history
  • Loading branch information
Salah Eddine Lalami committed Oct 29, 2023
1 parent 42c1c6d commit 342b100
Show file tree
Hide file tree
Showing 33 changed files with 583 additions and 183 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/HeaderContent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function HeaderContent() {
<Avatar
icon={<AppstoreOutlined />}
onClick={() => {
dispatch(langAction.translate());
dispatch(langAction.translate('zh_cn'));
}}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/Navigation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function Sidebar({ collapsible }) {
label: <Link to={'/admin'}>{translate('admin')}</Link>,
},
{
label: 'Settings',
label: translate('Settings'),
key: 'settings',
icon: <SettingOutlined />,
children: [
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ function App() {
useEffect(() => {
if (langCode === 'fr_FR') {
setLocal(frFR);
} else if (langCode === 'zh_CN') {
setLocal(zhCN);
} else {
setLocal(enUS);
}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/ReadItem/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const data = {
company: 'IDURAR',
managerSurname: 'Lalami ',
managerName: 'Salah Eddine',
email: 'idurardz@gmail.com',
phone: '05541 144 700',
email: 'test@gmail.com',
phone: '0777 777 777',
};

const readColumns = [
Expand All @@ -24,11 +24,11 @@ const readColumns = [
dataIndex: 'company',
},
{
title: 'Manager Surname',
title: 'Manager first name',
dataIndex: 'managerSurname',
},
{
title: 'Manager Name',
title: 'Manager last name',
dataIndex: 'managerName',
},
{
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Tag/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Tag } from 'antd';
import useLanguage from '@/lang/useLanguage';

export function StatusTag(status = 'draft') {
const translate = useLanguage();
let color =
status === 'draft'
? 'cyan'
Expand All @@ -12,5 +14,5 @@ export function StatusTag(status = 'draft') {
? 'orange'
: 'red';

return <Tag color={color}>{status && status.toUpperCase()}</Tag>;
return <Tag color={color}>{status && translate(status)}</Tag>;
}
25 changes: 25 additions & 0 deletions frontend/src/lang/default.js → frontend/src/lang/en_us.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,31 @@ const lang = {
error_500: 'Error 500 - Internal Server Error',
sub_total: 'Sub Total',
are_you_sure_you_want_to_delete: 'Are you sure you want to delete : ',

core_setting: 'Core Setting',
created: 'Created',
created_by: 'Created By',
credit: 'Credit',
currency_settings: 'Currency Settings',
declined: 'Declined',
default: 'Default',
due_balance: 'Due Balance',
expired: 'Expired',
expired_date: 'Expired Date',
invoices_preview: 'Invoices Preview',
not_paid: 'Not Paid',
offers_preview: 'Offers Preview',
paid: 'Paid',
partially: 'Partially',
payments_preview: 'Payments Preview',
quotes_preview: 'Quotes Preview',
template: 'Template',
this_month: 'This Month',
unpaid: 'Unpaid',
value: 'Value',
active_customer: 'Active Customer',
customer_preview: 'Customer Preview',
new_customer_this_month: 'New Customer This Month',
};

export default lang;
24 changes: 24 additions & 0 deletions frontend/src/lang/fr_fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,29 @@ const lang = {
error_500: 'Erreur 500 - Erreur interne du serveur',
sub_total: 'Sous-total',
are_you_sure_you_want_to_delete: 'Etes-vous sûr que vous voulez supprimer :',
core_setting: 'Paramètre de base',
created: 'Créé',
created_by: 'Créé par',
credit: 'Crédit',
currency_settings: 'Paramètres de devise',
declined: 'Refusé',
default: 'Défaut',
due_balance: 'Solde dû',
expired: 'Expiré',
expired_date: "Date d'expiration",
invoices_preview: 'Aperçu des factures',
not_paid: 'Non payé',
offers_preview: 'Aperçu des offres',
paid: 'Payé',
partially: 'Partiellement',
payments_preview: 'Aperçu des paiements',
quotes_preview: 'Aperçu des devis',
template: 'Modèle',
this_month: 'Ce mois-ci',
unpaid: 'Impayé',
value: 'Valeur',
active_customer: 'Client actif',
customer_preview: 'Aperçu du client',
new_customer_this_month: 'Nouveau client ce mois-ci',
};
export default lang;
2 changes: 1 addition & 1 deletion frontend/src/lang/useLanguage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const getLabel = (lang, key) => {
key +
' please review your language config file and add this label'
);
return 'No label found';
return 'No translate';
}
};

Expand Down
Loading

0 comments on commit 342b100

Please sign in to comment.