Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
SEARCH BAR, but it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
mapachurro committed Apr 22, 2024
1 parent aeff8ae commit 057371b
Show file tree
Hide file tree
Showing 27 changed files with 7,958 additions and 405 deletions.
1 change: 1 addition & 0 deletions i18n/locales/src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions i18n/locales/src/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
22 changes: 22 additions & 0 deletions i18next-scanner.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const path = require('path');

module.exports = {
input: ['src/**/*.{js,jsx}'], // Specify the input files to scan
output: 'src/i18n/locales/', // Specify the output directory for the translation files
options: {
debug: true, // Enable debugging
removeUnusedKeys: false, // Remove unused translation keys
func: {
list: ['i18next.t', 'i18n.t'], // List of functions to scan for translation keys
extensions: ['.js', '.jsx'] // File extensions to scan
},
lngs: ['en', 'es', 'ar', 'de', 'fr', 'id', 'it', 'ja', 'ko', 'nl', 'pt-br', 'ru', 'th', 'tl', 'tr', 'uk', 'vi', 'zh-cn'], // List of languages to generate translation files for
ns: ['translation'], // Namespace to use for translation keys
defaultLng: 'en', // Default language
resource: {
loadPath: 'src/i18n/locales/{{lng}}/{{ns}}.json', // Path to load existing translation files
savePath: 'src/i18n/locales/{{lng}}/{{ns}}.json', // Path to save updated translation files
jsonIndent: 2 // Indentation for the JSON files
}
}
};
1 change: 1 addition & 0 deletions src/i18n/config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ i18n
// Add other languages here
},
lng: 'en', // default language
lngs: ['en', 'es', 'ar', 'de', 'fr', 'id', 'it', 'ja', 'ko', 'nl', 'pt-br', 'ru', 'th', 'tl', 'tr', 'uk', 'vi', 'zh-cn'], // List of languages to generate translation files for
fallbackLng: 'en', // fallback language
interpolation: {
escapeValue: false, // react already safes from xss
Expand Down
Loading

0 comments on commit 057371b

Please sign in to comment.