From 18e776b041ad89181950f704fd56ee14a5e5fd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20Rodr=C3=ADguez?= Date: Wed, 7 Aug 2024 10:16:51 +0200 Subject: [PATCH] Remove English as a locale After reading lots of code from many community projects, it seems that en.po is not needed, since the original strings are in English anyway. It would only be required if you wanted to have a regional version of English, such as en_UK or en_AU. This commit removes en.po and the English file from po/LINGUAS, and also changes the way locales are prepared both in build-aux/macos-build.sh and on build-aux/msys-build.sh --- build-aux/macos-build.sh | 9 +- build-aux/msys-build.sh | 2 +- po/LINGUAS | 3 - po/en.po | 400 --------------------------------------- 4 files changed, 5 insertions(+), 409 deletions(-) delete mode 100644 po/en.po diff --git a/build-aux/macos-build.sh b/build-aux/macos-build.sh index 96b0f87..b33e2aa 100755 --- a/build-aux/macos-build.sh +++ b/build-aux/macos-build.sh @@ -51,7 +51,7 @@ gtk4-update-icon-cache -q -t -f "$RESOURCES_ROOT/share/icons/hicolor" gtk4-update-icon-cache -q -t -f "$RESOURCES_ROOT/share/icons/Adwaita" # Add extra locales -for lang in $(cat "po/LINGUAS" | grep -v '^#\|en'); do +for lang in $(cat "po/LINGUAS" | grep -v '^#'); do cp -f $(brew --prefix)/share/locale/$lang/LC_MESSAGES/{gdk-pixbuf,gettext-runtime,glib20,gtk40,gtksourceview-5,libadwaita,shared-mime-info}.mo "$RESOURCES_ROOT/share/locale/$lang/LC_MESSAGES" done @@ -161,11 +161,10 @@ find "$RESOURCES_ROOT/lib/gdk-pixbuf-2.0/2.10.0/loaders" -name '*.so' | while re done # These directories must exist for macOS to pick the locales (they can be empty) -mkdir -p "$RESOURCES_ROOT/ca.lproj" mkdir -p "$RESOURCES_ROOT/en.lproj" -mkdir -p "$RESOURCES_ROOT/eo.lproj" -mkdir -p "$RESOURCES_ROOT/es.lproj" -mkdir -p "$RESOURCES_ROOT/ro.lproj" +for lang in $(cat "po/LINGUAS" | grep -v '^#'); do + mkdir -p "$RESOURCES_ROOT/$lang.lproj" +done # Create Info.plist cat > "$APP_ROOT/Contents/Info.plist" << EOF diff --git a/build-aux/msys-build.sh b/build-aux/msys-build.sh index 0218507..f6c6d08 100644 --- a/build-aux/msys-build.sh +++ b/build-aux/msys-build.sh @@ -49,7 +49,7 @@ cp -RTn $MINGW_PREFIX/share/icons/Adwaita share/icons/Adwaita cp -RTn $MINGW_PREFIX/share/icons/hicolor share/icons/hicolor cp -RTn $MINGW_PREFIX/share/gtksourceview-5 share/gtksourceview-5 -for lang in $(cat "$CARTERO_ROOT_DIR/po/LINGUAS" | grep -v '^#\|en'); do +for lang in $(cat "$CARTERO_ROOT_DIR/po/LINGUAS" | grep -v '^#'); do cp -f $MINGW_PREFIX/share/locale/$lang/LC_MESSAGES/{gdk-pixbuf,gettext-runtime,glib20,gtk40,gtksourceview-5,libadwaita,shared-mime-info}.mo share/locale/$lang/LC_MESSAGES done diff --git a/po/LINGUAS b/po/LINGUAS index d04a2fc..ecc5f70 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,8 +1,5 @@ # Please, keep this file sorted alphabetically. -# If you add new locales here, remember to update build-aux/macos-build.sh -# ca -en eo es ro diff --git a/po/en.po b/po/en.po deleted file mode 100644 index 40c458d..0000000 --- a/po/en.po +++ /dev/null @@ -1,400 +0,0 @@ -# English translations for cartero package. -# Copyright (C) 2024 THE cartero'S COPYRIGHT HOLDER -# This file is distributed under the same license as the cartero package. -# Automatically generated, 2024. -# -msgid "" -msgstr "" -"Project-Id-Version: cartero\n" -"Report-Msgid-Bugs-To: https://github.com/danirod/cartero/issues\n" -"POT-Creation-Date: 2024-08-05 17:30+0200\n" -"PO-Revision-Date: 2024-06-22 13:31+0200\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.4\n" - -#: data/cartero.appdata.xml.in.in:8 data/cartero.desktop.in.in:4 -msgid "Make HTTP requests and test APIs" -msgstr "" - -#: data/cartero.appdata.xml.in.in:11 -msgid "" -"Cartero is a graphical HTTP client that can be used as a developer tool to " -"test web APIs and perform all kind of HTTP requests to web servers. It is " -"compatible with any REST, SOAP or XML-RPC API and it supports multiple " -"request methods as well as attaching body payloads to compatible requests." -msgstr "" - -#: data/cartero.appdata.xml.in.in:12 -msgid "Features:" -msgstr "" - -#: data/cartero.appdata.xml.in.in:14 -msgid "" -"Loads and saves to plain Git-friendly TOML files, so that you can own your " -"data." -msgstr "" - -#: data/cartero.appdata.xml.in.in:15 -msgid "" -"Customization and modification of the request headers and body payloads." -msgstr "" - -#: data/cartero.appdata.xml.in.in:16 -msgid "Variable binding for API keys and other secret information." -msgstr "" - -#: data/cartero.appdata.xml.in.in:22 -msgid "Main window of Cartero" -msgstr "" - -#: data/cartero.appdata.xml.in.in:26 -msgid "Modifying HTTP headers" -msgstr "" - -#: data/cartero.appdata.xml.in.in:30 -msgid "Setting the request payload" -msgstr "" - -#: data/cartero.desktop.in.in:3 -msgid "Cartero" -msgstr "" - -#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! -#: data/cartero.desktop.in.in:11 -msgid "Gnome;GTK;HTTP;REST;" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:6 -msgid "Automatically indent new lines for the request body" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:10 -msgid "Wrap the body content" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:14 -msgid "Whether to indent the request body with spaces or tabs" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:18 -msgid "Show line numbers in the request and response bodies" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:22 -msgid "How many characters to pad when indenting the request body" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:27 -msgid "How large should new windows be" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:31 -msgid "How tall should new windows be" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:35 -msgid "Whether the application should open maximized" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:39 -msgid "The position of the split between two windows" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:43 -msgid "The current list of opened files" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:47 -msgid "The last location where a file was opened" -msgstr "" - -#: data/es.danirod.Cartero.gschema.xml:51 -msgid "The last location where a file was saved" -msgstr "" - -#: data/gtk/help_overlay.blp:26 -msgctxt "shortcuts window" -msgid "General shortcuts" -msgstr "" - -#: data/gtk/help_overlay.blp:29 -msgctxt "shortcuts window" -msgid "Show Keyboard Shortcuts" -msgstr "" - -#: data/gtk/help_overlay.blp:34 -msgctxt "shortcuts window" -msgid "Quit" -msgstr "" - -#: data/gtk/help_overlay.blp:40 -msgctxt "shortcuts window" -msgid "Tab operations" -msgstr "" - -#: data/gtk/help_overlay.blp:43 -msgctxt "shortcuts window" -msgid "New request tab" -msgstr "" - -#: data/gtk/help_overlay.blp:48 -msgctxt "shortcuts window" -msgid "Open request" -msgstr "" - -#: data/gtk/help_overlay.blp:53 -msgctxt "shortcuts window" -msgid "Save request" -msgstr "" - -#: data/gtk/help_overlay.blp:58 -msgctxt "shortcuts window" -msgid "Save request as" -msgstr "" - -#: data/gtk/help_overlay.blp:63 -msgctxt "shortcuts window" -msgid "Close request tab" -msgstr "" - -#: data/gtk/help_overlay.blp:69 -msgctxt "shortcuts window" -msgid "Request operations" -msgstr "" - -#: data/gtk/help_overlay.blp:72 -msgctxt "shortcuts window" -msgid "Send request" -msgstr "" - -#: data/ui/endpoint_pane.blp:59 -msgid "Request URL" -msgstr "" - -#: data/ui/endpoint_pane.blp:70 -msgid "Send" -msgstr "" - -#: data/ui/endpoint_pane.blp:71 -msgid "Execute this HTTP request" -msgstr "" - -#: data/ui/endpoint_pane.blp:104 -msgid "Parameters" -msgstr "" - -#: data/ui/endpoint_pane.blp:125 data/ui/response_panel.blp:70 -msgid "Headers" -msgstr "" - -#: data/ui/endpoint_pane.blp:146 -msgid "Variables" -msgstr "" - -#: data/ui/endpoint_pane.blp:167 data/ui/response_panel.blp:47 -msgid "Body" -msgstr "" - -#: data/ui/key_value_row.blp:40 -msgid "Name" -msgstr "" - -#: data/ui/key_value_row.blp:50 -msgid "Value" -msgstr "" - -#: data/ui/key_value_row.blp:61 -msgid "Actions" -msgstr "" - -#: data/ui/key_value_row.blp:74 -msgid "Toggle secret" -msgstr "" - -#: data/ui/key_value_row.blp:81 -msgid "Delete" -msgstr "" - -#: data/ui/main_window.blp:41 data/ui/main_window_no_csd.blp:39 -msgid "New" -msgstr "" - -#: data/ui/main_window.blp:52 data/ui/main_window.blp:63 -#: data/ui/main_window_no_csd.blp:50 data/ui/main_window_no_csd.blp:61 -#: src/widgets/file_dialogs.rs:31 -msgid "Open" -msgstr "" - -#: data/ui/main_window.blp:71 data/ui/main_window_no_csd.blp:69 -#: src/widgets/file_dialogs.rs:75 -msgid "Save" -msgstr "" - -#: data/ui/main_window.blp:95 data/ui/main_window_no_csd.blp:102 -msgid "Welcome to Cartero" -msgstr "" - -#: data/ui/main_window.blp:96 data/ui/main_window_no_csd.blp:103 -msgid "Create or open a request and start testing APIs now." -msgstr "" - -#: data/ui/main_window.blp:115 data/ui/main_window.blp:149 -#: data/ui/main_window_no_csd.blp:122 data/ui/main_window_no_csd.blp:156 -msgid "New tab" -msgstr "" - -#: data/ui/main_window.blp:128 data/ui/main_window.blp:154 -#: data/ui/main_window_no_csd.blp:135 data/ui/main_window_no_csd.blp:161 -msgid "Open request..." -msgstr "" - -#: data/ui/main_window.blp:159 data/ui/main_window_no_csd.blp:166 -#: src/widgets/file_dialogs.rs:76 -msgid "Save request" -msgstr "" - -#: data/ui/main_window.blp:164 data/ui/main_window_no_csd.blp:171 -msgid "Save request as..." -msgstr "" - -#: data/ui/main_window.blp:169 data/ui/main_window_no_csd.blp:176 -msgid "Close tab" -msgstr "" - -#: data/ui/main_window.blp:176 data/ui/main_window_no_csd.blp:183 -msgid "Body appearance" -msgstr "" - -#: data/ui/main_window.blp:180 data/ui/main_window_no_csd.blp:187 -msgid "Wrap content" -msgstr "" - -#: data/ui/main_window.blp:185 data/ui/main_window_no_csd.blp:192 -msgid "Show line numbers" -msgstr "" - -#: data/ui/main_window.blp:192 data/ui/main_window_no_csd.blp:199 -msgid "Automatic indentation" -msgstr "" - -#: data/ui/main_window.blp:197 data/ui/main_window_no_csd.blp:204 -msgid "Indent with spaces" -msgstr "" - -#: data/ui/main_window.blp:203 data/ui/main_window_no_csd.blp:210 -msgid "Indent with tabs" -msgstr "" - -#: data/ui/main_window.blp:209 data/ui/main_window_no_csd.blp:216 -msgid "Spaces per tab" -msgstr "" - -#: data/ui/main_window.blp:212 data/ui/main_window_no_csd.blp:219 -msgid "2" -msgstr "" - -#: data/ui/main_window.blp:218 data/ui/main_window_no_csd.blp:225 -msgid "4" -msgstr "" - -#: data/ui/main_window.blp:224 data/ui/main_window_no_csd.blp:231 -msgid "8" -msgstr "" - -#: data/ui/main_window.blp:235 data/ui/main_window_no_csd.blp:242 -msgid "Keyboard shortcuts" -msgstr "" - -#: data/ui/main_window.blp:240 data/ui/main_window_no_csd.blp:247 -msgid "About Cartero" -msgstr "" - -#: data/ui/main_window.blp:245 data/ui/main_window_no_csd.blp:252 -msgid "Quit" -msgstr "" - -#: data/ui/method_dropdown.blp:30 -msgid "Request method" -msgstr "" - -#: data/ui/payload_tab.blp:35 -msgid "Body type" -msgstr "" - -#: data/ui/payload_tab.blp:81 -msgid "(none)" -msgstr "" - -#: data/ui/payload_tab.blp:82 -msgid "URL Encoded" -msgstr "" - -#: data/ui/payload_tab.blp:83 -msgid "Multipart Form Data" -msgstr "" - -#: data/ui/payload_tab.blp:86 -msgid "Raw" -msgstr "" - -#: data/ui/response_panel.blp:29 -msgid "Ready to request" -msgstr "" - -#: data/ui/response_panel.blp:30 -msgid "Use the Send button to send a network request and it will show here." -msgstr "" - -#: data/ui/save_dialog.blp:22 -msgid "Save changes?" -msgstr "" - -#: data/ui/save_dialog.blp:23 -msgid "There are changes that have not been saved yet. What do you want to do?" -msgstr "" - -#: data/ui/save_dialog.blp:28 -msgid "_Cancel" -msgstr "" - -#: data/ui/save_dialog.blp:29 -msgid "_Discard" -msgstr "" - -#: data/ui/save_dialog.blp:30 -msgid "_Save" -msgstr "" - -#: src/widgets/file_dialogs.rs:18 -msgid "Request (.cartero)" -msgstr "" - -#: src/widgets/file_dialogs.rs:20 -msgid "Request" -msgstr "" - -#: src/widgets/file_dialogs.rs:32 -msgid "Open request" -msgstr "" - -#: src/widgets/item_pane.rs:99 -msgid "(untitled)" -msgstr "" - -#: src/widgets/item_pane.rs:115 -msgid "Draft" -msgstr "" - -#: src/win.rs:495 -msgid "The Cartero authors" -msgstr "" - -#: src/win.rs:496 -msgid "© 2024 the Cartero authors" -msgstr ""