Skip to content

Commit

Permalink
Added more languages as a placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
lupusA committed Mar 8, 2024
1 parent 2664b8a commit 9c85f8c
Show file tree
Hide file tree
Showing 9 changed files with 208 additions and 23 deletions.
19 changes: 16 additions & 3 deletions public/locales/de-DE/translation.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
{
"user.interface": "Benutzeroberfläche",
"user.interface.appearance":"Erscheinungsbild",
"user.interface.appearance.small":"klein",
"user.interface.appearance.medium":"mittel",
"user.interface.appearance.large":"groß",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "Englisch",
"lang.de": "Deutsch",
"lang.es": "Spanisch",
"lang.fr": "Französisch",
"lang.ru": "Russisch",
"lang.jp": "Japanisch",
"lang.it": "Italienisch",

"lang.help": "Ändert die Sprache",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select":"Theme auswählen",
"theme.help": "Das aktuelle Theme",
"theme.description": "Thema",
"theme.select":"Thema auswählen",
"theme.help": "Das aktuelle Thema",
"theme.dark":"Dunkel",
"theme.light": "Hell",
"theme.pastel": "Pastelfarbend",
Expand Down
16 changes: 15 additions & 1 deletion public/locales/en-GB/translation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{
"user.interface": "User interface",
"user.interface.appearance":"Appearance",
"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "English",
"lang.de": "German",
"lang.es": "Spanish",
"lang.fr": "French",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.select.description": "Select the language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
Expand All @@ -16,6 +29,7 @@
"theme.pastel": "pastel",
"theme.ocean":"ocean",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
36 changes: 25 additions & 11 deletions public/locales/es-ES/translation.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{
"user.interface": "User interface",
"user.interface": "Interfaz de usuario",
"user.interface.appearance":"Presentación",
"user.interface.appearance.small":"pequeño",
"user.interface.appearance.medium":"medio",
"user.interface.appearance.large":"gran",

"lang.en": "Ingles",
"lang.de": "German",
"lang.es": "Spanish",
"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.select.description": "Select the language",
"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"theme.description": "Theme",
"lang.en": "Inglés",
"lang.de": "Alemán",
"lang.es": "Español",
"lang.fr": "Francés",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Establece el idioma de la interfaz de usuario",
"lang.select": "Seleccionar idioma",
"lang.description": "Seleccione el idioma",

"theme.description": "Tema",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.dark":"oscuro",
"theme.light": "luz",
"theme.pastel": "pastel",
"theme.ocean":"ocean",
"theme.ocean":"océano",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
35 changes: 35 additions & 0 deletions public/locales/fr-FR/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"user.interface": "Interface utilisateur",
"user.interface.appearance":"Appearance",
"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "English",
"lang.de": "German",
"lang.es": "Spanish",
"lang.fr": "Français",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.pastel": "pastel",
"theme.ocean":"ocean",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
35 changes: 35 additions & 0 deletions public/locales/it-IT/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"user.interface": "Interface utilisateur",
"user.interface.appearance":"Appearance",
"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "English",
"lang.de": "German",
"lang.es": "Spanish",
"lang.fr": "Français",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.pastel": "pastel",
"theme.ocean":"ocean",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
35 changes: 35 additions & 0 deletions public/locales/jp-JP/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"user.interface": "Interface utilisateur",
"user.interface.appearance":"Appearance",
"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "English",
"lang.de": "German",
"lang.es": "Spanish",
"lang.fr": "Français",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.pastel": "pastel",
"theme.ocean":"ocean",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
35 changes: 35 additions & 0 deletions public/locales/ru-RU/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"user.interface": "Interface utilisateur",
"user.interface.appearance":"Appearance",
"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"lang.en": "English",
"lang.de": "German",
"lang.es": "Spanish",
"lang.fr": "Français",
"lang.ru": "Russian",
"lang.jp": "Japanese",
"lang.it": "Italian",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.pastel": "pastel",
"theme.ocean":"ocean",

"byte.representation.description":"Select byte representation",
"byte.representation.select":"Select byte representation",
"byte.representation.help":"Specifies the representation of bytes"
}
2 changes: 1 addition & 1 deletion src/contexts/UIPreferencesContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const DEFAULT_PREFERENCES = { pageSize: PAGE_SIZES[0], bytesStringBase2: false,
export type Theme = "light" | "dark" | "pastel" | "ocean";
export type PageSize = 10 | 20 | 30 | 40 | 50 | 100;
export type FontSize = "fs-6" | "fs-5" | "fs-4";
export type Language = "en-GB" | "de-DE" | "es-ES";
export type Language = "en-GB" | "de-DE" | "es-ES" | "fr-FR" | "jp-JP" | "ru-RU" | "it-IT";

export interface UIPreferences {
get pageSize(): PageSize
Expand Down
18 changes: 11 additions & 7 deletions src/pages/Preferences.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ export function Preferences() {
</div>
<br />
<div className='form-group'>
<label className='label-description'>Appearance</label>
<label className='label-description'>{t('user.interface.appearance')}</label>
<select className="form-select form-select-sm" title='Select font size' id='fontSizeInput' value={fontSize} onChange={e => setFontSize(e.target.value)}>
<option value="fs-6">small</option>
<option value="fs-5">medium</option>
<option value="fs-4">large</option>
<option value="fs-6">{t('user.interface.appearance.small')}</option>
<option value="fs-5">{t('user.interface.appearance.medium')}</option>
<option value="fs-4">{t('user.interface.appearance.large')}</option>
</select>
<small hmtlfor="fontSizeInput" id='fontSizeHelp' className='form-text text-muted'>Specifies the appearance of the user interface</small>
</div>
<br />
<div className='form-group'>
<label className='label-description'>Page size</label>
<label className='label-description'>{t('user.interface.pagesize.description')}</label>
<input className='form-control form-control-sm' id='pageSizeInput'
type='text' placeholder='Page size' value={pageSize} disabled={true} />
<small hmtlfor="pageSizeInput" id='pageSizeHelp' className='form-text text-muted'>Specifies the pagination size in tables</small>
type='text' placeholder={t('user.interface.pagesize.hint')} value={pageSize} disabled={true} />
<small hmtlfor="pageSizeInput" id='pageSizeHelp' className='form-text text-muted'>{t('user.interface.pagesize.help')}</small>
</div>
</form >
</Accordion.Body>
Expand All @@ -63,6 +63,10 @@ export function Preferences() {
<option value="en-GB">{t('lang.en')}</option>
<option value="de-DE">{t('lang.de')}</option>
<option value="es-ES">{t('lang.es')}</option>
<option value="fr-FR">{t('lang.fr')}</option>
<option value="it-IT">{t('lang.it')}</option>
<option value="ru-RU">{t('lang.ru')}</option>
<option value="jp-JP">{t('lang.jp')}</option>
</select>
<small hmtlfor="languageInput" id='languageInputHelp' className='form-text text-muted'>{t('lang.help')}</small>
</div>
Expand Down

0 comments on commit 9c85f8c

Please sign in to comment.