diff --git a/README.md b/README.md index 2585c3b6..2f08724a 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Please **do not** create a pull request to update translation. tooot's translati ## Special thanks +[@amrtf](https://crowdin.com/profile/amrtf) for Spanish translation + [@pat](https://piaille.fr/@pat) for French translation [@forenta](https://github.com/forenta) for German translation diff --git a/ios/es.lproj/InfoPlist.strings b/ios/es.lproj/InfoPlist.strings new file mode 100644 index 00000000..3af308e1 --- /dev/null +++ b/ios/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"NSPhotoLibraryAddUsageDescription" = "Permita que tooot guarde imágenes en el rollo de su cámara"; +"NSPhotoLibraryUsageDescription" = "Permita que tooot guarde imágenes en el rollo de su cámara"; diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 1211ebab..e2d6ab42 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -78,6 +78,7 @@ E633A431281EB55C000E540F /* ShareExtension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ShareExtension-Bridging-Header.h"; sourceTree = ""; }; E66C0842291F095800DFFF60 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; E671BDF8290EAFB800287BD0 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; + E690AF692926B737002C38A8 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACA28DF282D0057EDEC /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACB28DF283A0057EDEC /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACC28DF28420057EDEC /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -293,6 +294,7 @@ ja, "zh-Hant", fr, + es, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; @@ -522,6 +524,7 @@ E6C8B26628F5F9FC0062CF2E /* ja */, E671BDF8290EAFB800287BD0 /* zh-Hant */, E66C0842291F095800DFFF60 /* fr */, + E690AF692926B737002C38A8 /* es */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/src/i18n/es/index.ts b/src/i18n/es/index.ts new file mode 100644 index 00000000..5f2a7a82 --- /dev/null +++ b/src/i18n/es/index.ts @@ -0,0 +1,18 @@ +export default { + common: require('./common'), + + screens: require('./screens'), + screenActions: require('./screens/actions'), + screenAnnouncements: require('./screens/announcements'), + screenCompose: require('./screens/compose'), + screenImageViewer: require('./screens/imageViewer'), + screenTabs: require('./screens/tabs'), + + componentContextMenu: require('./components/contextMenu'), + componentEmojis: require('./components/emojis'), + componentInstance: require('./components/instance'), + componentMediaSelector: require('./components/mediaSelector'), + componentParse: require('./components/parse'), + componentRelationship: require('./components/relationship'), + componentTimeline: require('./components/timeline') +} diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index b06bc5e2..45b4edeb 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -3,6 +3,7 @@ import { initReactI18next } from 'react-i18next' import de from '@root/i18n/de' import en from '@root/i18n/en' +import es from '@root/i18n/es' import fr from '@root/i18n/fr' import it from '@root/i18n/it' import ja from '@root/i18n/ja' @@ -18,6 +19,7 @@ import '@formatjs/intl-locale/polyfill' import '@formatjs/intl-pluralrules/polyfill' import '@formatjs/intl-pluralrules/locale-data/de' import '@formatjs/intl-pluralrules/locale-data/en' +import '@formatjs/intl-pluralrules/locale-data/es' import '@formatjs/intl-pluralrules/locale-data/fr' import '@formatjs/intl-pluralrules/locale-data/it' import '@formatjs/intl-pluralrules/locale-data/ja' @@ -29,6 +31,7 @@ import '@formatjs/intl-pluralrules/locale-data/zh' import '@formatjs/intl-numberformat/polyfill' import '@formatjs/intl-numberformat/locale-data/de' import '@formatjs/intl-numberformat/locale-data/en' +import '@formatjs/intl-numberformat/locale-data/es' import '@formatjs/intl-numberformat/locale-data/fr' import '@formatjs/intl-numberformat/locale-data/it' import '@formatjs/intl-numberformat/locale-data/ja' @@ -41,6 +44,7 @@ import '@formatjs/intl-numberformat/locale-data/zh-Hant' import '@formatjs/intl-datetimeformat/polyfill' import '@formatjs/intl-datetimeformat/locale-data/de' import '@formatjs/intl-datetimeformat/locale-data/en' +import '@formatjs/intl-datetimeformat/locale-data/es' import '@formatjs/intl-datetimeformat/locale-data/fr' import '@formatjs/intl-datetimeformat/locale-data/it' import '@formatjs/intl-datetimeformat/locale-data/ja' @@ -54,6 +58,7 @@ import '@formatjs/intl-datetimeformat/add-all-tz' import '@formatjs/intl-relativetimeformat/polyfill' import '@formatjs/intl-relativetimeformat/locale-data/de' import '@formatjs/intl-relativetimeformat/locale-data/en' +import '@formatjs/intl-relativetimeformat/locale-data/es' import '@formatjs/intl-relativetimeformat/locale-data/fr' import '@formatjs/intl-relativetimeformat/locale-data/it' import '@formatjs/intl-relativetimeformat/locale-data/ja' @@ -70,7 +75,19 @@ i18n.use(initReactI18next).init({ ns: ['common'], defaultNS: 'common', - resources: { de, en, fr, it, ja, ko, 'pt-BR': pt_BR, vi, 'zh-Hans': zh_Hans, 'zh-Hant': zh_Hant }, + resources: { + de, + en, + es, + fr, + it, + ja, + ko, + 'pt-BR': pt_BR, + vi, + 'zh-Hans': zh_Hans, + 'zh-Hant': zh_Hant + }, returnEmptyString: false, saveMissing: true, diff --git a/src/i18n/locales.ts b/src/i18n/locales.ts index e9bf4b4d..ab6e507a 100644 --- a/src/i18n/locales.ts +++ b/src/i18n/locales.ts @@ -1,14 +1,15 @@ const LOCALES = { de: 'Deutsch', en: 'English', + es: 'Español', fr: 'Français', it: 'Italiano', ja: '日本語', ko: '한국어', - 'pt-BR': 'Português (Brasil)', + 'pt-br': 'Português (Brasil)', vi: 'Tiếng Việt', - 'zh-Hans': '简体中文', - 'zh-Hant': '繁體中文' + 'zh-hans': '简体中文', + 'zh-hant': '繁體中文' } export { LOCALES } diff --git a/src/screens/Tabs/Me/Settings/App.tsx b/src/screens/Tabs/Me/Settings/App.tsx index 5b32e359..b2ef7d70 100644 --- a/src/screens/Tabs/Me/Settings/App.tsx +++ b/src/screens/Tabs/Me/Settings/App.tsx @@ -45,8 +45,12 @@ const SettingsApp: React.FC = () => { /> Platform.OS === 'ios'