diff --git a/Dockerfile b/Dockerfile index dc7a100f1..2366c30ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer="Liyas Thomas (liyascthomas@gmail.com)" # Add git as the prebuild target requires it to parse version information RUN apk add --update --no-cache \ - git + git WORKDIR /app diff --git a/assets/css/styles.scss b/assets/css/styles.scss index db2cb1c60..a43e7c38e 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -1,18 +1,22 @@ // Layout transitions -.layout-enter-active, .layout-leave-active { +.layout-enter-active, +.layout-leave-active { transition: opacity 0.5s; } -.layout-enter, .layout-leave-active { +.layout-enter, +.layout-leave-active { opacity: 0; } // Page transitions -.page-enter-active, .page-leave-active { +.page-enter-active, +.page-leave-active { transition: opacity 0.5s; } -.page-enter, .page-leave-to { +.page-enter, +.page-leave-to { opacity: 0; } diff --git a/assets/js/curlparser.js b/assets/js/curlparser.js index 0a6effa5e..c004e46e7 100644 --- a/assets/js/curlparser.js +++ b/assets/js/curlparser.js @@ -7,7 +7,7 @@ import * as querystring from "querystring"; * output this: 'msg1=value1&msg2=value2' * @param dataArguments */ -const joinDataArguments = (dataArguments) => { +const joinDataArguments = dataArguments => { let data = ""; dataArguments.forEach((argument, i) => { if (i === 0) { @@ -17,9 +17,9 @@ const joinDataArguments = (dataArguments) => { } }); return data; -} +}; -const parseCurlCommand = (curlCommand) => { +const parseCurlCommand = curlCommand => { let newlineFound = /\r|\n/.exec(curlCommand); if (newlineFound) { // remove newlines @@ -47,7 +47,7 @@ const parseCurlCommand = (curlCommand) => { } let headers; - const parseHeaders = (headerFieldName) => { + const parseHeaders = headerFieldName => { if (parsedArguments[headerFieldName]) { if (!headers) { headers = {}; @@ -55,7 +55,7 @@ const parseCurlCommand = (curlCommand) => { if (!Array.isArray(parsedArguments[headerFieldName])) { parsedArguments[headerFieldName] = [parsedArguments[headerFieldName]]; } - parsedArguments[headerFieldName].forEach((header) => { + parsedArguments[headerFieldName].forEach(header => { if (header.includes("Cookie")) { // stupid javascript tricks: closure cookieString = header; @@ -95,7 +95,7 @@ const parseCurlCommand = (curlCommand) => { if (!Array.isArray(parsedArguments.F)) { parsedArguments.F = [parsedArguments.F]; } - parsedArguments.F.forEach((multipartArgument) => { + parsedArguments.F.forEach(multipartArgument => { // input looks like key=value. value could be json or a file path prepended with an @ const [key, value] = multipartArgument.split("=", 2); multipartUploads[key] = value; @@ -221,6 +221,6 @@ const parseCurlCommand = (curlCommand) => { request.insecure = true; } return request; -} +}; export default parseCurlCommand; diff --git a/assets/js/pwa.js b/assets/js/pwa.js index 02ed1b133..32fd46e82 100644 --- a/assets/js/pwa.js +++ b/assets/js/pwa.js @@ -2,36 +2,39 @@ export default () => { //*** Determine whether or not the PWA has been installed. ***// // Step 1: Check local storage - let pwaInstalled = localStorage.getItem('pwaInstalled') === 'yes'; + let pwaInstalled = localStorage.getItem("pwaInstalled") === "yes"; // Step 2: Check if the display-mode is standalone. (Only permitted for PWAs.) - if (!pwaInstalled && window.matchMedia('(display-mode: standalone)').matches) { - localStorage.setItem('pwaInstalled', 'yes'); + if ( + !pwaInstalled && + window.matchMedia("(display-mode: standalone)").matches + ) { + localStorage.setItem("pwaInstalled", "yes"); pwaInstalled = true; } // Step 3: Check if the navigator is in standalone mode. (Again, only permitted for PWAs.) if (!pwaInstalled && window.navigator.standalone === true) { - localStorage.setItem('pwaInstalled', 'yes'); + localStorage.setItem("pwaInstalled", "yes"); pwaInstalled = true; } //*** If the PWA has not been installed, show the install PWA prompt.. ***// let deferredPrompt = null; - window.addEventListener('beforeinstallprompt', (event) => { + window.addEventListener("beforeinstallprompt", event => { deferredPrompt = event; // Show the install button if the prompt appeared. if (!pwaInstalled) { - document.querySelector('#installPWA').style.display = 'inline-flex'; + document.querySelector("#installPWA").style.display = "inline-flex"; } }); // When the app is installed, remove install prompts. - window.addEventListener('appinstalled', (event) => { - localStorage.setItem('pwaInstalled', 'yes'); + window.addEventListener("appinstalled", event => { + localStorage.setItem("pwaInstalled", "yes"); pwaInstalled = true; - document.getElementById('installPWA').style.display = 'none'; + document.getElementById("installPWA").style.display = "none"; }); // When the app is uninstalled, add the prompts back @@ -40,13 +43,14 @@ export default () => { deferredPrompt.prompt(); let outcome = await deferredPrompt.userChoice; - if (outcome === 'accepted') { - console.log('Postwoman was installed successfully.') + if (outcome === "accepted") { + console.log("Postwoman was installed successfully."); } else { - console.log('Postwoman could not be installed. (Installation rejected by user.)') + console.log( + "Postwoman could not be installed. (Installation rejected by user.)" + ); } deferredPrompt = null; } }; - }; diff --git a/build.js b/build.js index 85fd72dcd..be7f3f4c3 100644 --- a/build.js +++ b/build.js @@ -1,12 +1,10 @@ const axios = require("axios"); const fs = require("fs"); -const { - spawnSync -} = require("child_process"); +const { spawnSync } = require("child_process"); const runCommand = (command, args) => spawnSync(command, args) - .stdout.toString() - .replace(/\n/g, ""); + .stdout.toString() + .replace(/\n/g, ""); const FAIL_ON_ERROR = false; const PW_BUILD_DATA_DIR = "./.postwoman"; @@ -21,18 +19,24 @@ try { let version = {}; // Get the current version name as the tag from Git. - version.name = process.env.TRAVIS_TAG || runCommand("git", ["tag --sort=committerdate | tail -1"]); + version.name = + process.env.TRAVIS_TAG || + runCommand("git", ["tag --sort=committerdate | tail -1"]); // FALLBACK: If version.name was unset, let's grab it from GitHub. if (!version.name) { - version.name = (await axios - .get("https://api.github.com/repos/liyasthomas/postwoman/releases") - // If we can't get it from GitHub, we'll resort to getting it from package.json - .catch((ex) => ({ - data: [{ - tag_name: require("./package.json").version - }] - }))).data[0]["tag_name"]; + version.name = ( + await axios + .get("https://api.github.com/repos/liyasthomas/postwoman/releases") + // If we can't get it from GitHub, we'll resort to getting it from package.json + .catch(ex => ({ + data: [ + { + tag_name: require("./package.json").version + } + ] + })) + ).data[0]["tag_name"]; } // Get the current version hash as the short hash from Git. @@ -41,8 +45,8 @@ try { version.variant = process.env.TRAVIS_BRANCH || runCommand("git", ["branch"]) - .split("* ")[1] - .split(" ")[0] + (IS_DEV_MODE ? " - DEV MODE" : ""); + .split("* ")[1] + .split(" ")[0] + (IS_DEV_MODE ? " - DEV MODE" : ""); if (["", "master"].includes(version.variant)) { delete version.variant; } diff --git a/cypress.json b/cypress.json index 5050dfc30..b551af705 100644 --- a/cypress.json +++ b/cypress.json @@ -1,9 +1,9 @@ { - "baseUrl": "http://localhost:3000", - "integrationFolder": "tests/e2e/integration", - "screenshotsFolder": "tests/e2e/screenshots", - "fixturesFolder": "tests/e2e/fixtures", - "supportFile": "tests/e2e/support", - "pluginsFile": false, - "video": false + "baseUrl": "http://localhost:3000", + "integrationFolder": "tests/e2e/integration", + "screenshotsFolder": "tests/e2e/screenshots", + "fixturesFolder": "tests/e2e/fixtures", + "supportFile": "tests/e2e/support", + "pluginsFile": false, + "video": false } diff --git a/database.rules.json b/database.rules.json index f54493dbd..f13660294 100644 --- a/database.rules.json +++ b/database.rules.json @@ -1,7 +1,6 @@ { - /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */ "rules": { ".read": false, ".write": false } -} \ No newline at end of file +} diff --git a/directives/textareaAutoHeight.js b/directives/textareaAutoHeight.js index 243220183..74c8b9c90 100644 --- a/directives/textareaAutoHeight.js +++ b/directives/textareaAutoHeight.js @@ -1,8 +1,8 @@ export default { name: "textareaAutoHeight", - update({scrollHeight, clientHeight, style}) { + update({ scrollHeight, clientHeight, style }) { if (scrollHeight !== clientHeight) { style.minHeight = `${scrollHeight}px`; } } -} +}; diff --git a/functions/preRequest.js b/functions/preRequest.js index aa608d01c..73d8cb423 100644 --- a/functions/preRequest.js +++ b/functions/preRequest.js @@ -5,16 +5,16 @@ export default function getEnvironmentVariablesFromScript(script) { // for security and control purposes, this is the only way a pre-request script should modify variables. let pw = { environment: { - set: (key, value) => _variables[key] = value, + set: (key, value) => (_variables[key] = value) }, env: { - set: (key, value) => _variables[key] = value, - }, + set: (key, value) => (_variables[key] = value) + } // globals that the script is allowed to have access to. }; // run pre-request script within this function so that it has access to the pw object. - (new Function('pw', script))(pw); + new Function("pw", script)(pw); return _variables; } diff --git a/functions/templating.js b/functions/templating.js index e75f83628..7967ae7d8 100644 --- a/functions/templating.js +++ b/functions/templating.js @@ -3,5 +3,5 @@ export default function parseTemplateString(string, variables) { return string; } const searchTerm = /<<([^>]*)>>/g; // "<>" - return string.replace(searchTerm, (match, p1) => variables[p1] || ''); + return string.replace(searchTerm, (match, p1) => variables[p1] || ""); } diff --git a/lang/en-US.js b/lang/en-US.js index d8d44af56..729f14408 100644 --- a/lang/en-US.js +++ b/lang/en-US.js @@ -1,3 +1,84 @@ export default { - send: 'Send' -} + home: "Home", + realtime: "Realtime", + graphql: "GraphQL", + settings: "Settings", + request: "Request", + install_pwa: "Install PWA", + support_us: "Support us", + tweet: "Tweet", + options: "Options", + communication: "Communication", + endpoint: "Endpoint", + schema: "Schema", + theme: "Theme", + subscribe: "Subscribe", + choose_language: "Choose Language", + shortcuts: "Shortcuts", + send_request: "Send Request", + save_to_collections: "Save to Collections", + copy_request_link: "Copy Request Link", + reset_request: "Reset Request", + support_us_on: "Support us on", + open_collective: "Open Collective", + paypal: "PayPal", + patreon: "Patreon", + javascript_code: "JavaScript Code", + method: "Method", + path: "Path", + label: "Label", + again: "Again", + content_type: "Content Type", + raw_input: "Raw input", + parameter_list: "Parameter List", + raw_request_body: "Raw Request Body", + show_code: "Show Code", + hide_code: "Hide Code", + show_prerequest_script: "Show Pre-Request Script", + hide_prerequest_script: "Hide Pre-Request Script", + authentication: "Authentication", + authentication_type: "Authentication type", + include_in_url: "Include in URL", + parameters: "Parameters", + expand_response: "Expand response", + collapse_response: "Collapse response", + hide_preview: "Hide Preview", + preview_html: "Preview HTML", + history: "History", + collections: "Collections", + import_curl: "Import cURL", + import: "Import", + generate_code: "Generate code", + request_type: "Request type", + generated_code: "Generated code", + status: "Status", + headers: "Headers", + websocket: "WebSocket", + waiting_for_connection: "(waiting for connection)", + message: "Message", + sse: "SSE", + server: "Server", + events: "Events", + url: "URL", + get_schema: "Get schema", + header_list: "Header list", + add_new: "Add new", + response: "Response", + query: "Query", + queries: "Queries", + mutations: "Mutations", + subscriptions: "Subscriptions", + types: "Types", + send: "Send", + background: "Background", + color: "Color", + labels: "Labels", + multi_color: "Multi-color", + enabled: "Enabled", + disabled: "Disabled", + proxy: "Proxy", + postwoman_official_proxy_hosting: + "Postwoman's Official Proxy is hosted by ApolloTV.", + read_the: "Read the", + apollotv_privacy_policy: "ApolloTV privacy policy" +}; diff --git a/lang/es-ES.js b/lang/es-ES.js index 4422672c8..2f9f1f978 100644 --- a/lang/es-ES.js +++ b/lang/es-ES.js @@ -1,3 +1,83 @@ export default { - send: 'Enviar' -} + home: "home", + realtime: "realtime", + graphql: "graphql", + settings: "settings", + request: "request", + install_pwa: "install_pwa", + support_us: "support_us", + tweet: "tweet", + options: "options", + communication: "communication", + endpoint: "endpoint", + schema: "schema", + theme: "theme", + subscribe: "subscribe", + choose_language: "choose_language", + shortcuts: "shortcuts", + send_request: "send_request", + save_to_collections: "save_to_collections", + copy_request_link: "copy_request_link", + reset_request: "reset_request", + support_us_on: "support_us_on", + open_collective: "open_collective", + paypal: "paypal", + patreon: "patreon", + javascript_code: "javascript_code", + method: "method", + path: "path", + label: "label", + again: "again", + content_type: "content_type", + raw_input: "raw_input", + parameter_list: "parameter_list", + raw_request_body: "raw_request_body", + show_code: "show_code", + hide_code: "hide_code", + show_prerequest_script: "show_prerequest_script", + hide_prerequest_script: "hide_prerequest_script", + authentication: "authentication", + authentication_type: "authentication_type", + include_in_url: "include_in_url", + parameters: "parameters", + expand_response: "expand_response", + collapse_response: "collapse_response", + hide_preview: "hide_preview", + preview_html: "preview_html", + history: "history", + collections: "collections", + import_curl: "import_curl", + import: "import", + generate_code: "generate_code", + request_type: "request_type", + generated_code: "generated_code", + status: "status", + headers: "headers", + websocket: "websocket", + waiting_for_connection: "(waiting_for_connection)", + message: "message", + sse: "sse", + server: "server", + events: "events", + url: "url", + get_schema: "get_schema", + header_list: "header_list", + add_new: "add_new", + response: "response", + query: "query", + queries: "queries", + mutations: "mutations", + subscriptions: "subscriptions", + types: "types", + send: "send", + background: "background", + color: "color", + labels: "labels", + multi_color: "multi_color", + enabled: "enabled", + disabled: "disabled", + proxy: "proxy", + postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting", + read_the: "read_the", + apollotv_privacy_policy: "apollotv_privacy_policy" +}; diff --git a/lang/fa-IR.js b/lang/fa-IR.js index 6cbb72dd3..2f9f1f978 100644 --- a/lang/fa-IR.js +++ b/lang/fa-IR.js @@ -1,3 +1,83 @@ export default { - send: 'ارسال' -} + home: "home", + realtime: "realtime", + graphql: "graphql", + settings: "settings", + request: "request", + install_pwa: "install_pwa", + support_us: "support_us", + tweet: "tweet", + options: "options", + communication: "communication", + endpoint: "endpoint", + schema: "schema", + theme: "theme", + subscribe: "subscribe", + choose_language: "choose_language", + shortcuts: "shortcuts", + send_request: "send_request", + save_to_collections: "save_to_collections", + copy_request_link: "copy_request_link", + reset_request: "reset_request", + support_us_on: "support_us_on", + open_collective: "open_collective", + paypal: "paypal", + patreon: "patreon", + javascript_code: "javascript_code", + method: "method", + path: "path", + label: "label", + again: "again", + content_type: "content_type", + raw_input: "raw_input", + parameter_list: "parameter_list", + raw_request_body: "raw_request_body", + show_code: "show_code", + hide_code: "hide_code", + show_prerequest_script: "show_prerequest_script", + hide_prerequest_script: "hide_prerequest_script", + authentication: "authentication", + authentication_type: "authentication_type", + include_in_url: "include_in_url", + parameters: "parameters", + expand_response: "expand_response", + collapse_response: "collapse_response", + hide_preview: "hide_preview", + preview_html: "preview_html", + history: "history", + collections: "collections", + import_curl: "import_curl", + import: "import", + generate_code: "generate_code", + request_type: "request_type", + generated_code: "generated_code", + status: "status", + headers: "headers", + websocket: "websocket", + waiting_for_connection: "(waiting_for_connection)", + message: "message", + sse: "sse", + server: "server", + events: "events", + url: "url", + get_schema: "get_schema", + header_list: "header_list", + add_new: "add_new", + response: "response", + query: "query", + queries: "queries", + mutations: "mutations", + subscriptions: "subscriptions", + types: "types", + send: "send", + background: "background", + color: "color", + labels: "labels", + multi_color: "multi_color", + enabled: "enabled", + disabled: "disabled", + proxy: "proxy", + postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting", + read_the: "read_the", + apollotv_privacy_policy: "apollotv_privacy_policy" +}; diff --git a/lang/fr-FR.js b/lang/fr-FR.js index d99c3ac55..49165f8e2 100644 --- a/lang/fr-FR.js +++ b/lang/fr-FR.js @@ -1,3 +1,84 @@ export default { - send: 'Envoyer' -} + home: "Accueil", + realtime: "Temps réel", + graphql: "GraphQL", + settings: "Paramètres", + request: "Request", + install_pwa: "Installer la PWA", + support_us: "Nous supporter", + tweet: "Tweeter", + options: "Options", + communication: "Communication", + endpoint: "Endpoint", + schema: "Schéma", + theme: "Thème", + subscribe: "S'inscrire", + choose_language: "Sélectionner une langue", + shortcuts: "Raccourcis", + send_request: "Envoyer la requête", + save_to_collections: "Sauvegarder dans les collections", + copy_request_link: "Copier le lien de la requête", + reset_request: "Réinitialiser la requête", + support_us_on: "Supportez-nous sur", + open_collective: "Ouvrir Collective", + paypal: "PayPal", + patreon: "Patreon", + javascript_code: "Code JavaScript", + method: "Méthode", + path: "Chemin d'accès", + label: "Libellé", + again: "Réessayer", + content_type: "Type de contenu", + raw_input: "Texte brut", + parameter_list: "Liste des paramètres", + raw_request_body: "Corps de la requête en texte brut", + show_code: "Afficher le code", + hide_code: "Masquer le code", + show_prerequest_script: "Afficher le script de pré-requête", + hide_prerequest_script: "Masquer le script de pré-requête", + authentication: "Authentification", + authentication_type: "Type d'authentification", + include_in_url: "Inclure dans l'URL", + parameters: "Paramètres", + expand_response: "Agrandir la réponse", + collapse_response: "Réduire la réponse", + hide_preview: "Masquer la prévisualisation", + preview_html: "Prévisualiser le HTML", + history: "Historique", + collections: "Collections", + import_curl: "Importer en cURL", + importer: "Importer", + generate_code: "Générer le code", + request_type: "Type de requête", + generated_code: "Code généré", + status: "Statut", + headers: "En-têtes", + websocket: "WebSocket", + waiting_for_connection: "(en attente de connexion)", + message: "Message", + sse: "SSE", + server: "Serveur", + events: "Évènements", + url: "URL", + get_schema: "Récuperer le schéma", + header_list: "Liste d'en-têtes", + add_new: "Ajouter", + response: "Réponse", + query: "Requête", + queries: "Requêtes", + mutations: "Mutations", + subscriptions: "Abonnements", + types: "Types", + send: "Envoyer", + background: "Arrière-plan", + color: "Couleur", + labels: "Libellés", + multi_color: "Multi-couleurs", + enabled: "Activé", + disabled: "Désactivé", + proxy: "Proxy", + postwoman_official_proxy_hosting: + "Le proxy officiel de Postwoman est hébergé par ApolloTV.", + read_the: "Lire la", + apollotv_privacy_policy: "politique de confidentialité ApolloTV" +}; diff --git a/lang/id-ID.js b/lang/id-ID.js new file mode 100644 index 000000000..2f9f1f978 --- /dev/null +++ b/lang/id-ID.js @@ -0,0 +1,83 @@ +export default { + home: "home", + realtime: "realtime", + graphql: "graphql", + settings: "settings", + request: "request", + install_pwa: "install_pwa", + support_us: "support_us", + tweet: "tweet", + options: "options", + communication: "communication", + endpoint: "endpoint", + schema: "schema", + theme: "theme", + subscribe: "subscribe", + choose_language: "choose_language", + shortcuts: "shortcuts", + send_request: "send_request", + save_to_collections: "save_to_collections", + copy_request_link: "copy_request_link", + reset_request: "reset_request", + support_us_on: "support_us_on", + open_collective: "open_collective", + paypal: "paypal", + patreon: "patreon", + javascript_code: "javascript_code", + method: "method", + path: "path", + label: "label", + again: "again", + content_type: "content_type", + raw_input: "raw_input", + parameter_list: "parameter_list", + raw_request_body: "raw_request_body", + show_code: "show_code", + hide_code: "hide_code", + show_prerequest_script: "show_prerequest_script", + hide_prerequest_script: "hide_prerequest_script", + authentication: "authentication", + authentication_type: "authentication_type", + include_in_url: "include_in_url", + parameters: "parameters", + expand_response: "expand_response", + collapse_response: "collapse_response", + hide_preview: "hide_preview", + preview_html: "preview_html", + history: "history", + collections: "collections", + import_curl: "import_curl", + import: "import", + generate_code: "generate_code", + request_type: "request_type", + generated_code: "generated_code", + status: "status", + headers: "headers", + websocket: "websocket", + waiting_for_connection: "(waiting_for_connection)", + message: "message", + sse: "sse", + server: "server", + events: "events", + url: "url", + get_schema: "get_schema", + header_list: "header_list", + add_new: "add_new", + response: "response", + query: "query", + queries: "queries", + mutations: "mutations", + subscriptions: "subscriptions", + types: "types", + send: "send", + background: "background", + color: "color", + labels: "labels", + multi_color: "multi_color", + enabled: "enabled", + disabled: "disabled", + proxy: "proxy", + postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting", + read_the: "read_the", + apollotv_privacy_policy: "apollotv_privacy_policy" +}; diff --git a/lang/pt-BR.js b/lang/pt-BR.js index 4422672c8..2f9f1f978 100644 --- a/lang/pt-BR.js +++ b/lang/pt-BR.js @@ -1,3 +1,83 @@ export default { - send: 'Enviar' -} + home: "home", + realtime: "realtime", + graphql: "graphql", + settings: "settings", + request: "request", + install_pwa: "install_pwa", + support_us: "support_us", + tweet: "tweet", + options: "options", + communication: "communication", + endpoint: "endpoint", + schema: "schema", + theme: "theme", + subscribe: "subscribe", + choose_language: "choose_language", + shortcuts: "shortcuts", + send_request: "send_request", + save_to_collections: "save_to_collections", + copy_request_link: "copy_request_link", + reset_request: "reset_request", + support_us_on: "support_us_on", + open_collective: "open_collective", + paypal: "paypal", + patreon: "patreon", + javascript_code: "javascript_code", + method: "method", + path: "path", + label: "label", + again: "again", + content_type: "content_type", + raw_input: "raw_input", + parameter_list: "parameter_list", + raw_request_body: "raw_request_body", + show_code: "show_code", + hide_code: "hide_code", + show_prerequest_script: "show_prerequest_script", + hide_prerequest_script: "hide_prerequest_script", + authentication: "authentication", + authentication_type: "authentication_type", + include_in_url: "include_in_url", + parameters: "parameters", + expand_response: "expand_response", + collapse_response: "collapse_response", + hide_preview: "hide_preview", + preview_html: "preview_html", + history: "history", + collections: "collections", + import_curl: "import_curl", + import: "import", + generate_code: "generate_code", + request_type: "request_type", + generated_code: "generated_code", + status: "status", + headers: "headers", + websocket: "websocket", + waiting_for_connection: "(waiting_for_connection)", + message: "message", + sse: "sse", + server: "server", + events: "events", + url: "url", + get_schema: "get_schema", + header_list: "header_list", + add_new: "add_new", + response: "response", + query: "query", + queries: "queries", + mutations: "mutations", + subscriptions: "subscriptions", + types: "types", + send: "send", + background: "background", + color: "color", + labels: "labels", + multi_color: "multi_color", + enabled: "enabled", + disabled: "disabled", + proxy: "proxy", + postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting", + read_the: "read_the", + apollotv_privacy_policy: "apollotv_privacy_policy" +}; diff --git a/lang/zh-CN.js b/lang/zh-CN.js index 5a4e86976..2f9f1f978 100644 --- a/lang/zh-CN.js +++ b/lang/zh-CN.js @@ -1,3 +1,83 @@ export default { - send: '发送' -} + home: "home", + realtime: "realtime", + graphql: "graphql", + settings: "settings", + request: "request", + install_pwa: "install_pwa", + support_us: "support_us", + tweet: "tweet", + options: "options", + communication: "communication", + endpoint: "endpoint", + schema: "schema", + theme: "theme", + subscribe: "subscribe", + choose_language: "choose_language", + shortcuts: "shortcuts", + send_request: "send_request", + save_to_collections: "save_to_collections", + copy_request_link: "copy_request_link", + reset_request: "reset_request", + support_us_on: "support_us_on", + open_collective: "open_collective", + paypal: "paypal", + patreon: "patreon", + javascript_code: "javascript_code", + method: "method", + path: "path", + label: "label", + again: "again", + content_type: "content_type", + raw_input: "raw_input", + parameter_list: "parameter_list", + raw_request_body: "raw_request_body", + show_code: "show_code", + hide_code: "hide_code", + show_prerequest_script: "show_prerequest_script", + hide_prerequest_script: "hide_prerequest_script", + authentication: "authentication", + authentication_type: "authentication_type", + include_in_url: "include_in_url", + parameters: "parameters", + expand_response: "expand_response", + collapse_response: "collapse_response", + hide_preview: "hide_preview", + preview_html: "preview_html", + history: "history", + collections: "collections", + import_curl: "import_curl", + import: "import", + generate_code: "generate_code", + request_type: "request_type", + generated_code: "generated_code", + status: "status", + headers: "headers", + websocket: "websocket", + waiting_for_connection: "(waiting_for_connection)", + message: "message", + sse: "sse", + server: "server", + events: "events", + url: "url", + get_schema: "get_schema", + header_list: "header_list", + add_new: "add_new", + response: "response", + query: "query", + queries: "queries", + mutations: "mutations", + subscriptions: "subscriptions", + types: "types", + send: "send", + background: "background", + color: "color", + labels: "labels", + multi_color: "multi_color", + enabled: "enabled", + disabled: "disabled", + proxy: "proxy", + postwoman_official_proxy_hosting: "postwoman_official_proxy_hosting", + read_the: "read_the", + apollotv_privacy_policy: "apollotv_privacy_policy" +}; diff --git a/layouts/default.vue b/layouts/default.vue index 535454be5..ba9c6dd59 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -31,7 +31,7 @@ class="icon" id="installPWA" @click.prevent="showInstallPrompt()" - v-tooltip="'Install PWA'" + v-tooltip="$t('install_pwa')" > offline_bolt @@ -47,7 +47,7 @@ v-close-popover > keyboard - Shortcuts + {{ $t("shortcuts") }}
@@ -57,7 +57,7 @@ v-close-popover > favorite - Support us + {{ $t("support_us") }}
@@ -76,7 +76,7 @@ d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z" /> - Tweet + {{ $t("tweet") }}
@@ -95,7 +95,7 @@ @@ -103,21 +103,21 @@ settings_input_hdmi cloud settings @@ -127,17 +127,17 @@