mirror of
https://github.com/meshtastic/web.git
synced 2026-02-08 06:41:49 -05:00
Add Brazilian Portuguese translatios and UI button
This commit is contained in:
@@ -12,10 +12,12 @@ import Header from './components/Header';
|
||||
import Main from './Main';
|
||||
import Translations_English from './translations/en';
|
||||
import Translations_Japanese from './translations/jp';
|
||||
import Translations_Portuguese from './translations/pt';
|
||||
|
||||
export enum LanguageEnum {
|
||||
ENGLISH,
|
||||
JAPANESE,
|
||||
PORTUGUESE,
|
||||
}
|
||||
|
||||
export interface languageTemplate {
|
||||
@@ -58,6 +60,9 @@ const App = () => {
|
||||
case LanguageEnum.ENGLISH:
|
||||
setTranslations(Translations_English);
|
||||
break;
|
||||
case LanguageEnum.PORTUGUESE:
|
||||
setTranslations(Translations_Portuguese);
|
||||
break;
|
||||
case LanguageEnum.JAPANESE:
|
||||
setTranslations(Translations_Japanese);
|
||||
break;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Jp, Us } from 'react-flags-select';
|
||||
import { Jp, Us, Br } from 'react-flags-select';
|
||||
import { FaCog, FaLaptop, FaMoon, FaSun } from 'react-icons/fa';
|
||||
|
||||
import type { languageTemplate } from '../../App';
|
||||
@@ -82,6 +82,19 @@ const SidebarUISettings = (props: SidebarUISettingsProps) => {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<NavItem
|
||||
onClick={() => {
|
||||
props.SetLanguage(LanguageEnum.PORTUGUESE);
|
||||
}}
|
||||
open={false}
|
||||
isDropdown={false}
|
||||
isNested={true}
|
||||
titleContent={
|
||||
<>
|
||||
Português <Br className="w-8 shadow-md" />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<NavItem
|
||||
onClick={() => {
|
||||
props.SetLanguage(LanguageEnum.JAPANESE);
|
||||
|
||||
17
src/translations/pt.ts
Normal file
17
src/translations/pt.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { languageTemplate } from '../App';
|
||||
|
||||
export default {
|
||||
no_messages_message: 'Não a mensagens ainda',
|
||||
ui_settings_title: 'Configurações da Interface',
|
||||
nodes_title: 'Nós',
|
||||
device_settings_title: 'Configurações do dispositivo',
|
||||
device_channels_title: 'Canais',
|
||||
color_scheme_title: 'Esquema de cores',
|
||||
language_title: 'Idioma',
|
||||
device_region_title: 'Região do dispositivo',
|
||||
device_wifi_ssid: 'Nome do WiFi',
|
||||
device_wifi_psk: 'Senha do WiFi',
|
||||
save_changes_button: 'Salvar alterações',
|
||||
no_nodes_message: 'Nenhum nó foi encontrado',
|
||||
no_message_placeholder: 'Entre mensagem',
|
||||
} as languageTemplate;
|
||||
Reference in New Issue
Block a user