diff --git a/src/app/res/language/en/index.js b/src/app/res/language/en/index.js new file mode 100644 index 0000000..bfa672f --- /dev/null +++ b/src/app/res/language/en/index.js @@ -0,0 +1,7 @@ +import library from "./library" +import strings from "./strings" + +export { + library, + strings, +} diff --git a/src/app/res/language/en/info.json b/src/app/res/language/en/info.json new file mode 100644 index 0000000..1b4c3da --- /dev/null +++ b/src/app/res/language/en/info.json @@ -0,0 +1,5 @@ +{ + "code": "en", + "name": "English", + "author": "Yaroslav Koval" +} \ No newline at end of file diff --git a/src/app/res/language/en/library.js b/src/app/res/language/en/library.js new file mode 100644 index 0000000..3789157 --- /dev/null +++ b/src/app/res/language/en/library.js @@ -0,0 +1,22 @@ +export default class LanguageLibrary { + // [number, numbers, numbers] [minute, minutes, minutes] + static plural(data, { number = 1 } = {}) { + number = Math.abs(number) + if (Math.floor(number) !== number) return data[1] + return data[ + // eslint-disable-next-line no-nested-ternary + (number % 10 === 1 && number % 100 !== 11) ? 0 + : number % 10 >= 2 + && number % 10 <= 4 + && (number % 100 < 10 || number % 100 >= 20) ? 1 : 2 + ] + } + + static replace(data, { replace = {} } = {}) { + Object.keys(replace).forEach((key) => { + data = data.replace(RegExp(`{%${key}}`, "gi"), replace[key].toString()) + }) + + return data + } +} diff --git a/src/app/res/language/en/strings.js b/src/app/res/language/en/strings.js new file mode 100644 index 0000000..558bb46 --- /dev/null +++ b/src/app/res/language/en/strings.js @@ -0,0 +1,490 @@ +export default { + statement: { + "": "statement", + load_more: "load more", + no_operations_for_last_week: "you have not used this account in the last seven days", + still_nothing: "still empty", + warning: "warning", + requests_throttling: `This account is linked using a personal token. + Due to the fact that monobank limits the frequency of access to the statement, the data will be loaded slowly. + It is recommended to connect the account using simplified authorization.`, + hint_customize: "Not what you were expecting?", + hint_customize_text: "Control the order of cards and their appearance in the menu \"My cards\"", + open: "open", + choose_platinum_color: "choose the color of your platinum card", + accounts_changed: "account list error", + accounts_changed_text: "it looks like the list of accounts has been updated. Reboot to apply changes", + operation: "transaction", + }, + customization: { + open: "my cards", + card: "card", + bank: "bank", + look: "card type", + cardholder: "cardholder", + currency: "currency", + looks: { + black: "black", + grey: "gray", + pink: "pink", + white: "white", + iron: "iron", + yellow: "yellow", + }, + warning: "Due to the limitations of the monobank API, the application cannot determine the type of your card. However, you can set it yourself", + }, + currencies: { + retry: "once again", + fetch_fail: "error in receiving courses", + try_later: "try again later", + }, + menu: { + "": "menu", + app_upgraded: "the application has been updated", + see_whats_new: "see what's new", + }, + auth: { + "": "Authorization", + unofficial_warning: "Mono PWA is an unofficial application. It is not developed by monobank. Use the application only if you trust the developer and understand the risks (see Disclaimer)", + you_were_unlogined: "you have been deauthorized", + reload: "reload", + login_params_changed: "the login parameters have been changed. Select \"Settings\", if you want to return them to their original state", + login_promo: "log in to use all the features of Mono PWA", + log_in: "log in", + skip_step: "skip a beat", + unknown_auth_method: "unknown login method", + success: "success", + fail: "We could not confirm the accuracy of the data", + login_data_fetch_fail: "Login credentials failed", + settings: { + "": "customization", + token: { + "": "Use your own token", + description: "The application will send requests to monobank directly. You can get a token on the portal api.monobank.ua", + title: "Own token", + + token: "token", + }, + domain: { + "": "Change the corporate server", + description: "If you do not trust the server to which requests are sent during simplified authorization, you can change it", + title: "Change server", + + unsupported_server: "incompatible server", + url: "URL", + + proto_detected: "server detected", + name: "title", + author: "author", + proto_ver: "protocol version", + visit_homepage: "home page", + server_message: "message from", + see_link: "open the link", + }, + revert: { + "": "Continue as usual", + description: "Refuse advanced authorization settings and return to the default settings", + }, + }, + stage: { + link: "link", + opening: "opening monobank...", + copied: "The link has been copied to the clipboard, follow the steps below", + auto_link: "You should be logged in automatically. If not, follow the steps below", + open: "open", + qr: "QR", + cancel: "cancel", + authed: "authorized", + error: "an error occurred", + timeout: "time is up", + instructions: { + scan: { + "": "Scan the QR code", + description: "Using any tool for scanning QR codes on a device with monobank installed (for example, Google Lens)", + }, + follow: { + "": "Follow the link", + description: "Open the link or copy the URL to the browser on your mobile device", + }, + permissions: { + "": "Provide access", + description: "Confirm access to some data in the monobank application window", + }, + }, + }, + }, + p4: { + "": "purchase by parts", + partners: "partners", + fetch_fail: "error in receiving the list of partners", + try_later: "try again later", + retry: "repeat", + cached_title: "saved copy", + cache_for: "data as of", + online: "online ordering", + delivery: "with delivery", + delivery_exp: "this indicator means that when buying in parts, the partner provides an opportunity to place an order online with delivery", + online_exp: "this indicator means that when buying in parts, the partner provides an opportunity to place an order online, but you need to visit the store", + categories: "categories", + category: "category", + choose_category: "select a category", + all: "all", + no_data: "no data to show", + }, + currency: { + "": "exchange rates", + one: "currency", + numbers: "rate", + buy: "buying", + sell: "selling", + refresh: "refresh", + payment_systems: "rates of payment systems", + result: "result", + amount: "amount", + convert: "currency converter", + refreshing: "updating...", + refreshed: "updated", + error_refresh: "update error", + cached_title: "saved copy", + cache_for: "exchange rate as of", + fetch_fail: "error in obtaining the exchange rate", + try_later: "try again later", + rerty: "repeat", + }, + recovery_mode: { + "": "Emergency mode", + enter: "restart the application to enter the Emergency mode", + now: "Emergency mode is active", + back_to_normal: "Restart the app without a custom hash to quit it", + idb_fail: { + warning: "attention", + description: "There were difficulties trying to use the browser's storage. Please note that the app cannot work in Firefox private mode", + }, + }, + units: { + min: { + type: "func", + name: "plural", + data: ["minute", "minutes", "minutes"], + }, + }, + dateformats: { + week: { + "": "week", + days: { + "": "days of the week", + 7: "sunday", + 1: "monday", + 2: "tuesday", + 3: "wednesday", + 4: "thursday", + 5: "friday", + 6: "saturday", + }, + }, + relative: { + today: "today", + yesterday: "yesterday", + tomorrow: "tomorrow", + }, + + month: { + "": "month", + 1: "January", + 2: "February", + 3: "March", + 4: "April", + 5: "May", + 6: "June", + 7: "July", + 8: "August", + 9: "September", + 10: "October", + 11: "November", + 12: "December", + months: { + "": "months", + 1: "January", + 2: "February", + 3: "March", + 4: "April", + 5: "May", + 6: "June", + 7: "July", + 8: "August", + 9: "September", + 10: "October", + 11: "November", + 12: "December" + } + }, + at: "in", + }, + settings: { + "": "settings", + locked_item: "Hint: You cannot make changes here", + restart_to_apply: "reboot to apply changes", + errors: { + no_page: "there is no such settings page", + layout_failed: "It looks like we couldn't download Settings", + }, + descriptions: { + about_app: "Version, additional information", + storage: "Used space, reports, cache", + language: "Ukrainian, Russian, English", + notifications: "News, rebalancing", + offline_mode: "Use the saved data", + show_minor_part: "Display amounts in the format 00.00", + hide_credit_limit: "Deduct the credit limit from the balance sheet", + experiments: "Functionality in the process of testing", + }, + auth: { + "": "authorization", + log_in: "log in", + not_logined_title: "you are not logged in to your account", + not_logined_text: "sign in to use all features", + personal_token: "personal token", + monobank_account: "monobank account", + add_account: "add an account", + }, + notifications: { + "": "notifications", + info: "This list shows the available notification sources based on your settings", + list: "available sources", + source: "notification source", + empty: "no suggestions", + empty_info: "log in to your supported monobank account to subscribe to notifications", + push_service_url: "Notification service", + push_service: "API", + no_push_services_hint_title: "Don't understand why it's empty?", + no_push_services_hint_body: "Learn how notifications work", + no_push_services_hint_link: "https://sominemo.com/mono/help/article/uk/how-push-servers-work", + }, + privacy: { + "": "privacy", + info: "Sending error reports and analytics", + analytics: "analytics", + reports: "reports", + send_errors: { + "": "provide error data", + info: "Sending minimal information to fix the error. Contains the text of the error, the location where it occurred, the version of the application, the name and version of the browser/OS", + }, + send_reports: { + "": "automatically send reports", + info: "Sending the application event log. It contains events and errors, usage statistics, application version, browser and OS name and version", + }, + debug_log: { + "": "keep a detailed report", + info: "Collecting all possible information for defamation. Do not enable if you do not need it", + }, + }, + actions: { + open_about: "about the application", + go_main: "to the main page", + restart: "reload", + }, + general: { + "": "general", + information: "information", + }, + language: "language", + storage: { + "": "storage", + used: "used", + of: "of", + calculating: "calculation", + cleanup_planned: "the next startup will be cleaned up", + over_quota: "the storage has exceeded the limit, but does not support automatic cleaning", + dbs: { + logs: { + "": "reports", + description: "basic information about the program for debugging", + }, + offline_cache: { + "": "standalone data", + description: "saved information received from the Internet to work with it without a network connection", + }, + accounts: { + "": "accounts", + description: "your authorized monobank profiles", + }, + statement_cache: { + "": "statements", + description: "a saved copy of your account statements", + }, + card_settings: { + "": "cards", + description: "customize cards, such as their order, color, etc.", + }, + }, + actions: { + clear: "flush", + export: "export", + import: "import", + log_out: { + "": "log out", + you_will_log_out: "by continuing, you will be logged out of all accounts", + }, + }, + }, + updates: { + "": "updates", + ready: "updates are already here", + tell_more: "more", + later: "later", + restart_now: "apply now", + new_update: "the new version is ready for installation", + }, + + tf: { + "": "transformers", + tf_instances: "instances", + unlocked: "unlocked", + locked: "locked", + tf_methods: "methods", + }, + }, + about: { + "": "about", + app: "about the application", + version: "version", + build_date: "date of build", + branch: "branch", + debug: "debug", + build_flags: "assembly flags", + disclaimer_title: "disclaimer", + disclaimer: `Mono PWA is not an official application and is not affiliated with monobank in any way. +The application uses a publicly available API and does not transmit usage data to anyone for storage. +If you are against the transfer of your personal data to support the operation of the service, you must refuse the simplified authorization service. +You always have the right to use authorization with a personal token so that the data is transferred +directly to monobank. You assume responsibility for any outgoing requests on behalf of this program made +by you knowingly. +The application collects some depersonalized data, such as the number of linked accounts, the availability of purchased currency, +most frequent transaction category, etc., through the Google Analytics service. Your first name, last name, unique identifiers +and other sensitive data will not be disclosed to anyone. All data transmitted is used by the developer exclusively +for the purpose of audience analysis, thus improving the experience of using the application. You can always refuse the collection of +data in the Privacy menu or by enabling the Do Not Track function in your browser settings. +You always have the right to request the source code of the application at me@sominemo.com, +modify, publish, and execute the code in any form, and you will be responsible for the content.`, + }, + experiments: { + "": "experiments", + miscellaneous: "miscellaneous", + warning: "warning", + harmful_actions: `these options are experimental and some of them may cause problems, disrupt the stability of the program, or prevent it from working at all. + After applying changes, you should restart the application.`, + reload_page: "reload", + reset_flags: "reset", + list: "list", + no_exps_placeholder: "there is nothing to test now", + about: { + deny_analytics: { + title: "Opt out of data collection", + about: `Disable the Google Analytics service and stop collecting depersonalized data used to improve the user experience (for more information, see the menu "About" ' "Discloser"). + This flag is enabled automatically if Do Not Track requests are enabled in the browser`, + }, + miscellaneous_in_settings: { + title: "Show the Experiments menu in the menu", + about: "Adds this page to the settings menu", + }, + enable_tab_navigation: { + title: "Navigate with the TAB key", + about: `Simulate navigation in an application where pressing TAB is equivalent to + to move to the next item and pressing Enter to click on the item`, + }, + }, + }, + download_statement: { + "": "download the statement", + download: "begin", + working: "downloading", + disable_offline_mode: "turn off the standalone mode", + from: "from", + to: "to", + incorrect_range: "wrong spacing", + description: "You may need to download the statement if you want to use the history of transactions for a certain period without access to the network. The statement of each available account will be saved.", + }, + push: { + i: { + std: { + sign: "Notifications", + description: "Source of notifications", + }, + statement: { + unknown_account: "Bill", + description: "Transaction notifications", + }, + news: { + sign: "News", + description: "List of changes, important information", + }, + }, + not_supported: "Not supported on your device. Click to learn more", + not_supported_title: "The feature is not available", + not_supported_text: "Notifications are not supported in the Safari browser on MacOS, as well as in any browser on iOS/iPadOS and the WebKit engine in general. This is due to Apple not adhering to web standards and restricting developers. In order to be able to send notifications to Safari users, Apple requires the presence of a developer account, which means having a MacBook and paying a regular fee of $100/year. Mono PWA is a free program developed on a voluntary basis, and the developer does not have such resources.\n\nConsider using a different browser if you are on MacOS.\nConsider using a different device if you are on iOS.\n\nPraise Apple." + }, + fatal_error: { + "": "An error occurred", + explainer: "The application cannot load", + actions: { + "": "What you can do:", + send: { + title: "Send report", + info: "For analysis and resolution", + title_sent: "Report sent", + info_sent: "Thank you for your help", + info_auto: "Auto-sending is enabled", + }, + more: { + title: "Other options", + info: "Reporting, cache, resetting settings", + }, + replay: { + title: "Replay error", + info: "With a detailed report recording", + info_enabled: "Detailed reporting is already enabled", + }, + clear: { + title: "Clear cache", + info: "The application won't work without the network", + }, + reset: { + title: "Perform reset", + info: "Accounts and settings will be lost", + }, + help: { + title: "Seek help", + info: "Feedback in Telegram chat", + }, + export: { + title: "Export report", + info: "A file will be generated", + } + } + }, + unexpected_error: "oops!", + select_option: "select from the list", + tap_to_change: "tap to change", + done: "done", + select_file: "select file", + success: "success", + failure: "failure", + dev_warn: "this feature is in development", + preview_warn: "this feature is currently being tested and may not work correctly", + close: "close", + next: "next", + accept: "accept", + continue: "continue", + search: "search", + offline_mode: "offline mode", + hide_credit_limit: "hide credit balance", + quick_settings: "options", + show_minor_part: "show cents", + recommendation: "recommendation", + tip: "tip", + hint: "hint", + reload: "reload", + enable_accessibility: "enable accessibility", + skip_nav: "skip navigation", + copied: "copied", +} diff --git a/src/app/res/language/ru/strings.js b/src/app/res/language/ru/strings.js index 9729fd0..e365b6c 100644 --- a/src/app/res/language/ru/strings.js +++ b/src/app/res/language/ru/strings.js @@ -230,7 +230,7 @@ export default { descriptions: { about_app: "Версия, дополнительная информация", storage: "Используемое пространство, отчёты, кэш", - language: "Украинский, русский", + language: "Украинский, русский, английский", notifications: "Новости, изменение баланса", offline_mode: "Использовать сохранённые данные", show_minor_part: "Отображать суммы в формате 00.00", diff --git a/src/app/res/language/uk/strings.js b/src/app/res/language/uk/strings.js index 3e7c6ba..1c9925a 100644 --- a/src/app/res/language/uk/strings.js +++ b/src/app/res/language/uk/strings.js @@ -231,7 +231,7 @@ export default { descriptions: { about_app: "Версія, додаткова інформація", storage: "Використовуваний простір, звіти, кеш", - language: "Українська, російська", + language: "Українська, російська, англійська", notifications: "Новини, зміна балансу", offline_mode: "Використовувати збережені дані", show_minor_part: "Відображати суми у форматі 00.00",