Core: Tr::tr

Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-16 17:20:07 +01:00
parent 8f8150db2d
commit 015b1ee53c
104 changed files with 1481 additions and 11072 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -722,7 +722,7 @@
</message>
</context>
<context>
<name>Core::BaseFileWizard</name>
<name>::Core</name>
<message>
<source>File Generation Failure</source>
<translation>Falla generando archivo</translation>
@@ -771,9 +771,6 @@
Would you like to overwrite them?</source>
<translation>Los siguientes archivos ya existen en el directorio %1: %2. ¿Quiere sobreescribirlos?</translation>
</message>
</context>
<context>
<name>Core::EditorManager</name>
<message>
<source>Revert to Saved</source>
<translation>Revertir a la copia guardada</translation>
@@ -1006,9 +1003,6 @@ Would you like to overwrite them?</source>
<source>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Expands to&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;file name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;current line number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;current column number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;editor&apos;s x position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;editor&apos;s y position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;editor&apos;s width in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;editor&apos;s height in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;editor&apos;s width in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;editor&apos;s height in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
<translation>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Expande a&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;nombre de archivo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;número de línea actual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;número de columna actual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;posición x del editor en pantalla&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;posición y del editor en pantalla&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;ancho del editor en pixeles&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;altura del editor en pixeles&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;ancho del editor en caracteres&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;altura del editor en caracteres&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
</message>
</context>
<context>
<name>Core::FileManager</name>
<message>
<source>Can&apos;t save file</source>
<translation type="obsolete">No se pudo guardar el archivo</translation>
@@ -1037,23 +1031,14 @@ Would you like to overwrite them?</source>
<source>Save File As</source>
<translation>Guardar archivo como</translation>
</message>
</context>
<context>
<name>Core::Internal::ComboBox</name>
<message>
<source>Activate %1</source>
<translation>Activar %1</translation>
</message>
</context>
<context>
<name>Core::Internal::EditMode</name>
<message>
<source>Edit</source>
<translation>Edición</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorSplitter</name>
<message>
<source>Split Left/Right</source>
<translation>Dividir Izquierda/Derecha</translation>
@@ -1082,18 +1067,10 @@ Would you like to overwrite them?</source>
<source>Previous Document</source>
<translation>Documento previo</translation>
</message>
<message>
<source>Alt+Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Next Document</source>
<translation>Documento siguiente</translation>
</message>
<message>
<source>Alt+Right</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Previous Group</source>
<translation>Grupo previo</translation>
@@ -1110,9 +1087,6 @@ Would you like to overwrite them?</source>
<source>Move Document to Next Group</source>
<translation>Mover documento al grupo siguiente</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorView</name>
<message id="===============EditorView====================">
<source>Go Back</source>
<translation type="unfinished">Ir atrás</translation>
@@ -1126,14 +1100,6 @@ Would you like to overwrite them?</source>
<translatorcomment>Suplente?</translatorcomment>
<translation>Suplente</translation>
</message>
<message>
<source>Close</source>
<translation>Cerrar</translation>
</message>
<message>
<source>Make writable</source>
<translation>Hacer escribible</translation>
</message>
<message>
<source>File is writable</source>
<translation>El archivo es escribible</translation>
@@ -1142,9 +1108,6 @@ Would you like to overwrite them?</source>
<source>Copy full path to clipboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::GeneralSettings</name>
<message>
<source>General</source>
<translation></translation>
@@ -1211,9 +1174,6 @@ Would you like to overwrite them?</source>
<source>Ignore modifications</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::MainWindow</name>
<message>
<source>Qt Creator</source>
<translation></translation>
@@ -1367,41 +1327,10 @@ Would you like to overwrite them?</source>
<comment>Title of dialog</comment>
<translation>Nuevo...</translation>
</message>
</context>
<context>
<name>Core::Internal::MessageOutputWindow</name>
<message>
<source>General</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::NavComboBox</name>
<message>
<source>Activate %1</source>
<translation>Activar %1</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationSubWidget</name>
<message>
<source>Split</source>
<translation>Dividir</translation>
</message>
<message>
<source>Close</source>
<translation>Cerrar</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationWidget</name>
<message>
<source>Activate %1 Pane</source>
<translation>Activar panel %1</translation>
</message>
</context>
<context>
<name>Core::Internal::NewDialog</name>
<message>
<source>New Project</source>
<translation>Nuevo proyecto</translation>
@@ -1411,9 +1340,6 @@ Would you like to overwrite them?</source>
<source>1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWidget</name>
<message>
<source>Open Documents</source>
<translation>Documentos abiertos</translation>
@@ -1438,27 +1364,14 @@ Would you like to overwrite them?</source>
<source>Close All Editors</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWindow</name>
<message>
<source>*</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenWithDialog</name>
<message>
<source>Open file &apos;%1&apos; with:</source>
<translation>Abrir archivo &apos;%1&apos; con:</translation>
</message>
</context>
<context>
<name>Core::Internal::OutputPaneManager</name>
<message>
<source>Output</source>
<translation>Salida</translation>
</message>
<message>
<source>Clear</source>
<translation>Limpiar</translation>
@@ -1475,9 +1388,6 @@ Would you like to overwrite them?</source>
<source>Output &amp;Panes</source>
<translation>&amp;Paneles de salida</translation>
</message>
</context>
<context>
<name>Core::Internal::PluginDialog</name>
<message>
<source>Details</source>
<translation>Detalles</translation>
@@ -1487,10 +1397,6 @@ Would you like to overwrite them?</source>
<translatorcomment>Fehlermeldungen zu %1</translatorcomment>
<translation>Detalles de errores</translation>
</message>
<message>
<source>Close</source>
<translation>Cerrar</translation>
</message>
<message>
<source>Installed Plugins</source>
<translation>Plugins instalados</translation>
@@ -1503,16 +1409,10 @@ Would you like to overwrite them?</source>
<source>Plugin Errors of %1</source>
<translation>Errores del plugin %1</translation>
</message>
</context>
<context>
<name>Core::Internal::ProgressView</name>
<message>
<source>Processes</source>
<translation>Procesos</translation>
</message>
</context>
<context>
<name>Core::Internal::SaveItemsDialog</name>
<message>
<source>Don&apos;t Save</source>
<translation type="obsolete">No guardar</translation>
@@ -1533,17 +1433,10 @@ Would you like to overwrite them?</source>
<source>Save Selected</source>
<translation>Guardar seleccionado</translation>
</message>
</context>
<context>
<name>Core::Internal::ShortcutSettings</name>
<message>
<source>Keyboard</source>
<translation>Teclado</translation>
</message>
<message>
<source>Environment</source>
<translation>Entorno</translation>
</message>
<message>
<source>Import Keyboard Mapping Scheme</source>
<translation>Importar esquema de mapeado de teclas</translation>
@@ -1556,20 +1449,6 @@ Would you like to overwrite them?</source>
<source>Export Keyboard Mapping Scheme</source>
<translation>Exportar esquema de mapeado de teclas</translation>
</message>
</context>
<context>
<name>Core::Internal::SideBarWidget</name>
<message>
<source>Split</source>
<translation>Dividir</translation>
</message>
<message>
<source>Close</source>
<translation>Cerrar</translation>
</message>
</context>
<context>
<name>Core::Internal::VersionDialog</name>
<message>
<source>About Qt Creator</source>
<translation>Acerca de Qt Creator</translation>
@@ -1790,14 +1669,11 @@ Would you like to overwrite them?</source>
</message>
</context>
<context>
<name>Core::ModeManager</name>
<name>::Core</name>
<message>
<source>Switch to %1 mode</source>
<translation>Alternar al modo %1</translation>
</message>
</context>
<context>
<name>Core::ScriptManager</name>
<message>
<source>Exception at line %1: %2
%3</source>
@@ -1808,9 +1684,6 @@ Would you like to overwrite them?</source>
<source>Unknown error</source>
<translation>Error desconocido</translation>
</message>
</context>
<context>
<name>Core::StandardFileWizard</name>
<message>
<source>New %1</source>
<translatorcomment>TODO: Grammatical case problem</translatorcomment>
@@ -6072,7 +5945,7 @@ Skipping file.</source>
</message>
</context>
<context>
<name>Locator</name>
<name>::Core</name>
<message>
<source>Filters</source>
<translation>Filtros</translation>
@@ -7158,7 +7031,7 @@ Nombre base de librería: %1</translation>
</message>
</context>
<context>
<name>Core::FolderNavigationWidgetFactory</name>
<name>::Core</name>
<message>
<source>File System</source>
<translation>Sistema de archivos</translation>
@@ -9010,7 +8883,7 @@ p, li { white-space: pre-wrap; }
</message>
</context>
<context>
<name>Locator::ILocatorFilter</name>
<name>::Core</name>
<message>
<source>Filter Configuration</source>
<translation>Filtro de configuración</translation>
@@ -9023,9 +8896,6 @@ p, li { white-space: pre-wrap; }
<source>Prefix:</source>
<translation>Prefijo:</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilter</name>
<message>
<source>Generic Directory Filter</source>
<translation>Filtro genérico de directorios</translation>
@@ -9053,9 +8923,6 @@ p, li { white-space: pre-wrap; }
<source>%1 filter update: canceled</source>
<translation>Filtro %1 actualiza: cancelado</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilterOptions</name>
<message>
<source>Name:</source>
<translation>Nombre:</translation>
@@ -9107,25 +8974,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<translation>Especifique una palabra corta o abreviatura que pueda usarse para restringir el completado de archivos de este arbol de directorios.
Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y luego la palabra a buscar.</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilter</name>
<message>
<source>Files in file system</source>
<translation>Archivos en el sistema de archivos</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilterOptions</name>
<message>
<source>Filter configuration</source>
<translation>Ajustes de filtros</translation>
</message>
<message>
<location/>
<source>Prefix:</source>
<translation>Prefijo:</translation>
</message>
<message>
<location/>
<source>Limit to prefix</source>
@@ -9141,30 +8997,18 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
<source>Filter:</source>
<translation>Filtro:</translation>
</message>
</context>
<context>
<name>Locator::Internal::OpenDocumentsFilter</name>
<message>
<source>Open documents</source>
<translation>Documentos abiertos</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorFiltersFilter</name>
<message>
<source>Available filters</source>
<translation>Filtros disponibles</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorPlugin</name>
<message>
<source>Indexing</source>
<translation>Indizando</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorWidget</name>
<message>
<source>Refresh</source>
<translation>Refrescar</translation>
@@ -9185,9 +9029,6 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
<source>&lt;type here&gt;</source>
<translation>&lt;escribalo aquí&gt;</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsDialog</name>
<message>
<source>Configure Filters</source>
<translation>Ajustar filtros</translation>
@@ -9197,11 +9038,6 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
<source>Add</source>
<translation>Agregar</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Suprimir</translation>
</message>
<message>
<location/>
<source> min</source>
@@ -9212,55 +9048,20 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
<source>Refresh now!</source>
<translation>Refrescar ahora!</translation>
</message>
<message>
<location/>
<source>Edit...</source>
<translation>Editar...</translation>
</message>
<message>
<location/>
<source>Refresh Interval:</source>
<translation>Intervalo de refresco:</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsPage</name>
<message>
<source>%1 (Prefix: %2)</source>
<translation>%1 (Prefijo: %2)</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsWidget</name>
<message>
<source>Configure Filters</source>
<translation>Ajustar filtros</translation>
</message>
<message>
<location/>
<source>Add</source>
<translation>Agregar</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Suprimir</translation>
</message>
<message>
<location/>
<source>Edit</source>
<translation>Editar</translation>
</message>
<message>
<location/>
<source>Refresh Interval:</source>
<translation>Intervalo de refresco:</translation>
</message>
<message>
<location/>
<source> min</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RegExp::Internal::RegExpWindow</name>
@@ -11865,7 +11666,7 @@ p, li { white-space: pre-wrap; }
</message>
</context>
<context>
<name>Core::Internal::SettingsDialog</name>
<name>::Core</name>
<message>
<source>Preferences</source>
<translation type="unfinished"></translation>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1102,7 +1102,7 @@
</message>
</context>
<context>
<name>Core::0</name>
<name>::Core</name>
<message>
<source>File Generation Failure</source>
<translation type="obsolete">Hiba történt a fájl generálása közben</translation>
@@ -1415,9 +1415,6 @@ Felül szeretné írni azokat?</translation>
<source>New %1</source>
<translation type="obsolete">Új %1</translation>
</message>
</context>
<context>
<name>Core::BaseFileWizard</name>
<message>
<source>Unable to create the directory %1.</source>
<translation>Nem lehet létrehozni a(z) %1 könyvtárat.</translation>
@@ -1468,9 +1465,6 @@ Would you like to overwrite them?</source>
%2.
Felül szeretné írni azokat?</translation>
</message>
</context>
<context>
<name>Core::EditorManager</name>
<message>
<source>Revert to Saved</source>
<translation>Visszatérés az elmentett állapotra</translation>
@@ -1695,9 +1689,6 @@ Felül szeretné írni azokat?</translation>
<source>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Expands to&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;file name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;current line number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;current column number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;editor&apos;s x position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;editor&apos;s y position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;editor&apos;s width in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;editor&apos;s height in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;editor&apos;s width in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;editor&apos;s height in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
<translation>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Változó&lt;/th&gt;&lt;th&gt;kiterjesztés&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;fájl névre&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;aktuális sorszám&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;aktuális oszlopszám&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;a szerkesztő X Poziciója a képernyőn&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;a szerkesztő Y pozicója a képernyőn&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;a szerkesztő szélessége pixelekben &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;a szerkesztő magassága pixelekben &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;a szerkesztő szélessége karakterekben &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;a szerkesztő magassága karakterekben &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
</message>
</context>
<context>
<name>Core::FileManager</name>
<message>
<source>Cannot save file</source>
<translation>Nem lehet elmenti a fájlt</translation>
@@ -1718,9 +1709,6 @@ Felül szeretné írni azokat?</translation>
<source>Save File As</source>
<translation>Mentés másként</translation>
</message>
</context>
<context>
<name>Core::Internal::0</name>
<message>
<source>Activate %1</source>
<translation type="obsolete">%1 aktiválása</translation>
@@ -1757,18 +1745,10 @@ Felül szeretné írni azokat?</translation>
<source>Previous Document</source>
<translation type="obsolete">Voriges Dokument</translation>
</message>
<message>
<source>Alt+Left</source>
<translation type="obsolete">Alt+Left</translation>
</message>
<message>
<source>Next Document</source>
<translation type="obsolete">Nächstes Dokument</translation>
</message>
<message>
<source>Alt+Right</source>
<translation type="obsolete">Alt+Right</translation>
</message>
<message>
<source>Previous Group</source>
<translation type="obsolete">Vorige Gruppe</translation>
@@ -1789,14 +1769,6 @@ Felül szeretné írni azokat?</translation>
<source>Placeholder</source>
<translation type="obsolete">Helyőrző</translation>
</message>
<message>
<source>Close</source>
<translation type="obsolete">Bezárás</translation>
</message>
<message>
<source>Make writable</source>
<translation type="obsolete">Írhatóvá tétel</translation>
</message>
<message>
<source>File is writable</source>
<translation type="obsolete">A fájl írható</translation>
@@ -1987,10 +1959,6 @@ Felül szeretné írni azokat?</translation>
<comment>Title of dialog</comment>
<translation type="obsolete">Új</translation>
</message>
<message>
<source>Split</source>
<translation type="obsolete">Feldarabolás</translation>
</message>
<message>
<source>Activate %1 Pane</source>
<translation type="obsolete">&apos;%1&apos; panel aktiválása</translation>
@@ -2411,23 +2379,14 @@ p {
<source>Feedback</source>
<translation type="obsolete">Visszajelzés</translation>
</message>
</context>
<context>
<name>Core::Internal::ComboBox</name>
<message>
<source>Activate %1</source>
<translation>%1 aktiválása</translation>
</message>
</context>
<context>
<name>Core::Internal::EditMode</name>
<message>
<source>Edit</source>
<translation>Szerkesztés</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorSplitter</name>
<message>
<source>Split Left/Right</source>
<translation>Bal/Jobb feldarabolás</translation>
@@ -2456,18 +2415,10 @@ p {
<source>Previous Document</source>
<translation>Voriges Dokument</translation>
</message>
<message>
<source>Alt+Left</source>
<translation>Alt+Left</translation>
</message>
<message>
<source>Next Document</source>
<translation>Nächstes Dokument</translation>
</message>
<message>
<source>Alt+Right</source>
<translation>Alt+Right</translation>
</message>
<message>
<source>Previous Group</source>
<translation>Vorige Gruppe</translation>
@@ -2484,29 +2435,10 @@ p {
<source>Move Document to Next Group</source>
<translation>Dokument in nächste Gruppe verschieben</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorView</name>
<message>
<source>Go Back</source>
<translation>Vissza</translation>
</message>
<message>
<source>Go Forward</source>
<translation>Előre</translation>
</message>
<message>
<source>Placeholder</source>
<translation>Helyőrző</translation>
</message>
<message>
<source>Close</source>
<translation>Bezárás</translation>
</message>
<message>
<source>Make writable</source>
<translation>Írhatóvá tétel</translation>
</message>
<message>
<source>File is writable</source>
<translation>A fájl írható</translation>
@@ -2515,9 +2447,6 @@ p {
<source>Copy full path to clipboard</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::GeneralSettings</name>
<message>
<source>General settings</source>
<translation>Általános beállítások</translation>
@@ -2574,9 +2503,6 @@ p {
<source>Variables</source>
<translation>Változók</translation>
</message>
</context>
<context>
<name>Core::Internal::MainWindow</name>
<message>
<source>Qt Creator</source>
<translation>Qt Creator</translation>
@@ -2722,41 +2648,10 @@ p {
<source>Settings...</source>
<translation>Beállítások...</translation>
</message>
</context>
<context>
<name>Core::Internal::MessageOutputWindow</name>
<message>
<source>General</source>
<translation>Általános</translation>
</message>
</context>
<context>
<name>Core::Internal::NavComboBox</name>
<message>
<source>Activate %1</source>
<translation>%1 aktiválása</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationSubWidget</name>
<message>
<source>Split</source>
<translation>Feldarabolás</translation>
</message>
<message>
<source>Close</source>
<translation>Bezárás</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationWidget</name>
<message>
<source>Activate %1 Pane</source>
<translation>&apos;%1&apos; panel aktiválása</translation>
</message>
</context>
<context>
<name>Core::Internal::NewDialog</name>
<message>
<source>New Project</source>
<translation>Új Projekt</translation>
@@ -2765,25 +2660,14 @@ p {
<source>1</source>
<translation>1</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWidget</name>
<message>
<source>Open Documents</source>
<translation>Dokumentumok megnyitása</translation>
</message>
<message>
<source>Close %1</source>
<translation>%1 bezárása</translation>
</message>
<message>
<source>Close Editor</source>
<translation>Szerkesztő bezárása</translation>
</message>
<message>
<source>Close All Except %1</source>
<translation>Az összes bezárása a(z) %1 kivételével</translation>
</message>
<message>
<source>Close Other Editors</source>
<translation>Egyéb szerkesztők bezárása</translation>
@@ -2792,27 +2676,14 @@ p {
<source>Close All Editors</source>
<translation>Az összes szerkesztő bezárása</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWindow</name>
<message>
<source>*</source>
<translation>*</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenWithDialog</name>
<message>
<source>Open file &apos;%1&apos; with:</source>
<translation>&apos;%1&apos; fájl megnyitása ezzel::</translation>
</message>
</context>
<context>
<name>Core::Internal::OutputPaneManager</name>
<message>
<source>Output</source>
<translation>Kimenet</translation>
</message>
<message>
<source>Clear</source>
<translation>Kiürítés</translation>
@@ -2829,9 +2700,6 @@ p {
<source>Output &amp;Panes</source>
<translation>Kimeneti &amp;panelek</translation>
</message>
</context>
<context>
<name>Core::Internal::PluginDialog</name>
<message>
<source>Details</source>
<translation>Részletek</translation>
@@ -2840,10 +2708,6 @@ p {
<source>Error Details</source>
<translation>Hiba részletek</translation>
</message>
<message>
<source>Close</source>
<translation>Bezárás</translation>
</message>
<message>
<source>Installed Plugins</source>
<translation>Telepített beépülő modulok</translation>
@@ -2856,16 +2720,10 @@ p {
<source>Plugin Errors of %1</source>
<translation>%1 beépülő modul hibák</translation>
</message>
</context>
<context>
<name>Core::Internal::ProgressView</name>
<message>
<source>Processes</source>
<translation>Folyamatok</translation>
</message>
</context>
<context>
<name>Core::Internal::SaveItemsDialog</name>
<message>
<source>Do not Save</source>
<translation>Ne mentse el</translation>
@@ -2882,9 +2740,6 @@ p {
<source>Save Selected</source>
<translation>Kiválasztottak elmentése</translation>
</message>
</context>
<context>
<name>Core::Internal::SettingsDialog</name>
<message>
<source>Preferences</source>
<translation>Beállítások</translation>
@@ -2893,17 +2748,10 @@ p {
<source>Options</source>
<translation>Opciók</translation>
</message>
</context>
<context>
<name>Core::Internal::ShortcutSettings</name>
<message>
<source>Keyboard</source>
<translation>Billentyűzet</translation>
</message>
<message>
<source>Environment</source>
<translation>Környezet</translation>
</message>
<message>
<source>Import Keyboard Mapping Scheme</source>
<translation>Billentyűzet leképzési tervének importálása</translation>
@@ -2916,20 +2764,6 @@ p {
<source>Export Keyboard Mapping Scheme</source>
<translation>Billentyűzet leképezési terv exportálása</translation>
</message>
</context>
<context>
<name>Core::Internal::SideBarWidget</name>
<message>
<source>Split</source>
<translation>Feldarabolás</translation>
</message>
<message>
<source>Close</source>
<translation>Bezárás</translation>
</message>
</context>
<context>
<name>Core::Internal::VersionDialog</name>
<message>
<source>About Qt Creator</source>
<translation>Qt Creator-ról</translation>
@@ -2942,16 +2776,10 @@ p {
<source>&lt;h3&gt;Qt Creator %1&lt;/h3&gt;Based on Qt %2 (%3 bit)&lt;br/&gt;&lt;br/&gt;Built on %4 at %5&lt;br /&gt;&lt;br/&gt;%8&lt;br/&gt;Copyright 2008-%6 %7. All rights reserved.&lt;br/&gt;&lt;br/&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;br/&gt;</source>
<translation>&lt;h3&gt;Qt Creator %1&lt;/h3&gt;%2 Qt-n alapszik (%3 bites)&lt;br/&gt;&lt;br/&gt;%4-re épül%5&lt;br /&gt;&lt;br/&gt;%8&lt;br/&gt;Szerzői jog 2008-%6 %7. Minden jog fenntartva.&lt;br/&gt;&lt;br/&gt; A szolgáltatott programra úgy, ahogy van, semmi garancia sincs, beleértve a tervezés, eladhatóság és alkalmasság garanciáját egyéni célokra.&lt;br/&gt;</translation>
</message>
</context>
<context>
<name>Core::ModeManager</name>
<message>
<source>Switch to %1 mode</source>
<translation>&apos;%1&apos;-es módra kapcsolás</translation>
</message>
</context>
<context>
<name>Core::ScriptManager</name>
<message>
<source>Exception at line %1: %2
%3</source>
@@ -2962,16 +2790,10 @@ p {
<source>Unknown error</source>
<translation>Ismeretlen hiba</translation>
</message>
</context>
<context>
<name>Core::StandardFileWizard</name>
<message>
<source>New %1</source>
<translation>Új %1</translation>
</message>
</context>
<context>
<name>Core::Utils::0</name>
<message>
<source>The class name must not contain namespace delimiters.</source>
<translation type="obsolete">Az osztály neve nem tartalmazhat névtér határoló jeleket.</translation>
@@ -3148,10 +2970,6 @@ p {
<source>Delete line</source>
<translation type="obsolete">Sör törlése</translation>
</message>
<message>
<source>Clear</source>
<translation type="obsolete">Kiürítés</translation>
</message>
<message>
<source>From &quot;%1&quot;</source>
<translation type="obsolete">&quot;%1&quot;-tól</translation>
@@ -8802,7 +8620,7 @@ Fájl kihagyása.</translation>
</message>
</context>
<context>
<name>Locator</name>
<name>::Core</name>
<message>
<source>Filters</source>
<translation>Szűrők</translation>
@@ -8811,9 +8629,6 @@ Fájl kihagyása.</translation>
<source>Locator</source>
<translation>Lokátor</translation>
</message>
</context>
<context>
<name>Locator::ILocatorFilter</name>
<message>
<source>Filter Configuration</source>
<translation>Szűrő konfiguráció</translation>
@@ -8826,17 +8641,10 @@ Fájl kihagyása.</translation>
<source>Prefix:</source>
<translation>Előtag:</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilter</name>
<message>
<source>Generic Directory Filter</source>
<translation>Általános könyvtár szűrő</translation>
</message>
<message>
<source>Filter Configuration</source>
<translation>Szűrő konfiguráció</translation>
</message>
<message>
<source>Choose a directory to add</source>
<translation>Hozzáadni kívánt könyvtár kiválasztása</translation>
@@ -8854,9 +8662,6 @@ Fájl kihagyása.</translation>
<source>%1 filter update: canceled</source>
<translation>%1 szűrő frissítés: mégse</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilterOptions</name>
<message>
<source>Name:</source>
<translation>Név:</translation>
@@ -8869,20 +8674,12 @@ Fájl kihagyása.</translation>
<source>Specify file name filters, separated by comma. Filters may contain wildcards.</source>
<translation>Határozza meg a névszűrőket, vesszővel elválasztva. A szűrők tartalmazhatnak helyettesítő jeleket.</translation>
</message>
<message>
<source>Prefix:</source>
<translation>Előtag:</translation>
</message>
<message>
<source>Specify a short word/abbreviation that can be used to restrict completions to files from this directory tree.
To do this, you type this shortcut and a space in the Locator entry field, and then the word to search for.</source>
<translation>Határozzon meg egy rövidítést, amit a fájlok kiegészítésének korlátozására lehet használni ebből a könyvtár szerkezetből.
Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lokátor beviteli mezőbe, és aztán a keresett szót.Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeichen und dem Suchbegriff.</translation>
</message>
<message>
<source>Limit to prefix</source>
<translation>Előtag korlátozás</translation>
</message>
<message>
<source>Add...</source>
<translation>Hozzáadás...</translation>
@@ -8899,28 +8696,14 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
<source>Directories:</source>
<translation>Könyvtárak:</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilter</name>
<message>
<source>Files in file system</source>
<translation>Fájlrendszeren levő fájlok</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilterOptions</name>
<message>
<source>Filter configuration</source>
<translation>Szűrők konfigurálása</translation>
</message>
<message>
<source>Prefix:</source>
<translation>Előtag:</translation>
</message>
<message>
<source>Limit to prefix</source>
<translation>Előtag korlátozás</translation>
</message>
<message>
<source>Include hidden files</source>
<translation>Rejtett fájlokat beleértve</translation>
@@ -8929,23 +8712,14 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
<source>Filter:</source>
<translation>Szűrő:</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorFiltersFilter</name>
<message>
<source>Available filters</source>
<translation>Elérhető szűrők</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorPlugin</name>
<message>
<source>Indexing</source>
<translation>Indexelés</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorWidget</name>
<message>
<source>Refresh</source>
<translation>Felfrissítés</translation>
@@ -8966,23 +8740,14 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
<source>&lt;type here&gt;</source>
<translation>&lt;típus ide&gt;</translation>
</message>
</context>
<context>
<name>Locator::Internal::OpenDocumentsFilter</name>
<message>
<source>Open documents</source>
<translation>Dokumentumok megnyitása</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsPage</name>
<message>
<source>%1 (Prefix: %2)</source>
<translation>%1 (Előtag: %2)</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsWidget</name>
<message>
<source>Configure Filters</source>
<translation>Szűrők konfigurálása</translation>
@@ -8991,14 +8756,6 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
<source>Add</source>
<translation>Hozzáadás</translation>
</message>
<message>
<source>Remove</source>
<translation>Eltávolítás</translation>
</message>
<message>
<source>Edit</source>
<translation>Szerkesztés</translation>
</message>
<message>
<source>Refresh Interval:</source>
<translation>Intervallum frissítése:</translation>
@@ -11624,7 +11381,7 @@ Ok: %2</translation>
</message>
</context>
<context>
<name>Core::FolderNavigationWidgetFactory</name>
<name>::Core</name>
<message>
<source>File System</source>
<translation>Fájlrendszer</translation>

View File

@@ -740,7 +740,7 @@
</message>
</context>
<context>
<name>Core::BaseFileWizard</name>
<name>::Core</name>
<message>
<source>Unable to create the directory %1.</source>
<translation>Impossibile creare la cartella %1.</translation>
@@ -791,9 +791,6 @@ Would you like to overwrite them?</source>
%2.
Vuoi sovrascriverli?</translation>
</message>
</context>
<context>
<name>Core::EditorManager</name>
<message>
<source>Revert to Saved</source>
<translation>Torna al Salvato</translation>
@@ -1018,9 +1015,6 @@ Vuoi sovrascriverli?</translation>
<source>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Expands to&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;file name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;current line number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;current column number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;editor&apos;s x position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;editor&apos;s y position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;editor&apos;s width in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;editor&apos;s height in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;editor&apos;s width in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;editor&apos;s height in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
<translation>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variabile&lt;/th&gt;&lt;th&gt;Espansa in&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;nome del file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;numero di riga corrente&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;numero di colonna corrente&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;posizione x dell&apos;editor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;posizione y dell&apos;editor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;larghezza dell&apos;editor, in pixel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;altezza dell&apos;editor, in pixel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;larghezza dell&apos;editor, in caratteri&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;altezza dell&apos;editor, in caratteri&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
</message>
</context>
<context>
<name>Core::FileManager</name>
<message>
<source>Can&apos;t save file</source>
<translation type="obsolete">Impossibile salvare il file</translation>
@@ -1049,23 +1043,14 @@ Vuoi sovrascriverli?</translation>
<source>Save File As</source>
<translation>Salva il File Come</translation>
</message>
</context>
<context>
<name>Core::Internal::ComboBox</name>
<message>
<source>Activate %1</source>
<translation>Attiva %1</translation>
</message>
</context>
<context>
<name>Core::Internal::EditMode</name>
<message>
<source>Edit</source>
<translation>Modifica</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorSplitter</name>
<message>
<source>Split Left/Right</source>
<translation>Dividi Sinistra/Destra</translation>
@@ -1094,18 +1079,10 @@ Vuoi sovrascriverli?</translation>
<source>Previous Document</source>
<translation>Documento Precedente</translation>
</message>
<message>
<source>Alt+Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Next Document</source>
<translation>Documento Successivo</translation>
</message>
<message>
<source>Alt+Right</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Previous Group</source>
<translation>Gruppo Precedente</translation>
@@ -1122,9 +1099,6 @@ Vuoi sovrascriverli?</translation>
<source>Move Document to Next Group</source>
<translation>Sposta il Documento al Gruppo Successivo</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorView</name>
<message id="===============EditorView====================">
<source>Go Back</source>
<translation type="unfinished">Indietro</translation>
@@ -1137,14 +1111,6 @@ Vuoi sovrascriverli?</translation>
<source>Placeholder</source>
<translation>Segnaposto</translation>
</message>
<message>
<source>Close</source>
<translation>Chiudi</translation>
</message>
<message>
<source>Make writable</source>
<translation>Rendi scrivibile</translation>
</message>
<message>
<source>File is writable</source>
<translation>Il file è scrivibile</translation>
@@ -1153,9 +1119,6 @@ Vuoi sovrascriverli?</translation>
<source>Copy full path to clipboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::GeneralSettings</name>
<message>
<source>General</source>
<translation>Generale</translation>
@@ -1222,9 +1185,6 @@ Vuoi sovrascriverli?</translation>
<source>Ignore modifications</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::MainWindow</name>
<message>
<source>Qt Creator</source>
<translation>Qt Creator</translation>
@@ -1378,41 +1338,10 @@ Vuoi sovrascriverli?</translation>
<comment>Title of dialog</comment>
<translation>Nuovo...</translation>
</message>
</context>
<context>
<name>Core::Internal::MessageOutputWindow</name>
<message>
<source>General</source>
<translation>Generale</translation>
</message>
</context>
<context>
<name>Core::Internal::NavComboBox</name>
<message>
<source>Activate %1</source>
<translation>Attiva %1</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationSubWidget</name>
<message>
<source>Split</source>
<translation>Dividi</translation>
</message>
<message>
<source>Close</source>
<translation>Chiudi</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationWidget</name>
<message>
<source>Activate %1 Pane</source>
<translation>Attiva il Pannello %1</translation>
</message>
</context>
<context>
<name>Core::Internal::NewDialog</name>
<message>
<source>New Project</source>
<translation>Nuovo Progetto</translation>
@@ -1422,9 +1351,6 @@ Vuoi sovrascriverli?</translation>
<source>1</source>
<translation>1</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWidget</name>
<message>
<source>Open Documents</source>
<translation>Documenti Aperti</translation>
@@ -1449,27 +1375,14 @@ Vuoi sovrascriverli?</translation>
<source>Close All Editors</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWindow</name>
<message>
<source>*</source>
<translation>*</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenWithDialog</name>
<message>
<source>Open file &apos;%1&apos; with:</source>
<translation>Apri il file &apos;%1&apos; con:</translation>
</message>
</context>
<context>
<name>Core::Internal::OutputPaneManager</name>
<message>
<source>Output</source>
<translation>Uscita</translation>
</message>
<message>
<source>Clear</source>
<translation>Cancella</translation>
@@ -1486,9 +1399,6 @@ Vuoi sovrascriverli?</translation>
<source>Output &amp;Panes</source>
<translation>&amp;Pannelli di Uscita</translation>
</message>
</context>
<context>
<name>Core::Internal::PluginDialog</name>
<message>
<source>Details</source>
<translation>Dettagli</translation>
@@ -1497,10 +1407,6 @@ Vuoi sovrascriverli?</translation>
<source>Error Details</source>
<translation>Dettagli Errore</translation>
</message>
<message>
<source>Close</source>
<translation>Chiudi</translation>
</message>
<message>
<source>Installed Plugins</source>
<translation>Plugin Installati</translation>
@@ -1513,16 +1419,10 @@ Vuoi sovrascriverli?</translation>
<source>Plugin Errors of %1</source>
<translation>Errore Plugin di %1</translation>
</message>
</context>
<context>
<name>Core::Internal::ProgressView</name>
<message>
<source>Processes</source>
<translation>Processi</translation>
</message>
</context>
<context>
<name>Core::Internal::SaveItemsDialog</name>
<message>
<source>Don&apos;t Save</source>
<translation type="obsolete">Non Salvare</translation>
@@ -1543,17 +1443,10 @@ Vuoi sovrascriverli?</translation>
<source>Save Selected</source>
<translation>Salva Selezionati</translation>
</message>
</context>
<context>
<name>Core::Internal::ShortcutSettings</name>
<message>
<source>Keyboard</source>
<translation>Tastiera</translation>
</message>
<message>
<source>Environment</source>
<translation>Ambiente</translation>
</message>
<message>
<source>Import Keyboard Mapping Scheme</source>
<translation>Importa la Mappatura della Tastiera</translation>
@@ -1566,20 +1459,6 @@ Vuoi sovrascriverli?</translation>
<source>Export Keyboard Mapping Scheme</source>
<translation>Esporta Mappatura della Tastiera</translation>
</message>
</context>
<context>
<name>Core::Internal::SideBarWidget</name>
<message>
<source>Split</source>
<translation>Dividi</translation>
</message>
<message>
<source>Close</source>
<translation>Chiudi</translation>
</message>
</context>
<context>
<name>Core::Internal::VersionDialog</name>
<message>
<source>About Qt Creator</source>
<translation>Informazioni su Qt Creator</translation>
@@ -1810,14 +1689,11 @@ Vuoi sovrascriverli?</translation>
</message>
</context>
<context>
<name>Core::ModeManager</name>
<name>::Core</name>
<message>
<source>Switch to %1 mode</source>
<translation>Passa alla modalità %1</translation>
</message>
</context>
<context>
<name>Core::ScriptManager</name>
<message>
<source>Exception at line %1: %2
%3</source>
@@ -1828,9 +1704,6 @@ Vuoi sovrascriverli?</translation>
<source>Unknown error</source>
<translation>Errore sconosciuto</translation>
</message>
</context>
<context>
<name>Core::StandardFileWizard</name>
<message>
<source>New %1</source>
<translation>Nuovo %1</translation>
@@ -5968,7 +5841,7 @@ Causa: %3</translation>
</message>
</context>
<context>
<name>Locator</name>
<name>::Core</name>
<message>
<source>Filters</source>
<translation>Filtri</translation>
@@ -7079,7 +6952,7 @@ Nome di base della libreria: %1</translation>
</message>
</context>
<context>
<name>Core::FolderNavigationWidgetFactory</name>
<name>::Core</name>
<message>
<source>File System</source>
<translation>File System</translation>
@@ -8899,7 +8772,7 @@ p, li { white-space: pre-wrap; }
</message>
</context>
<context>
<name>Locator::ILocatorFilter</name>
<name>::Core</name>
<message>
<source>Filter Configuration</source>
<translation>Configurazione del Filtro</translation>
@@ -8912,17 +8785,10 @@ p, li { white-space: pre-wrap; }
<source>Prefix:</source>
<translation>Prefisso:</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilter</name>
<message>
<source>Generic Directory Filter</source>
<translation>Filtro Cartella Generica</translation>
</message>
<message>
<source>Filter Configuration</source>
<translation>Configurazione del Filtro</translation>
</message>
<message numerus="yes">
<source>%1 filter update: %n files</source>
<translation>
@@ -8942,9 +8808,6 @@ p, li { white-space: pre-wrap; }
<source>%1 filter update: canceled</source>
<translation>%1 aggiornamento filtri: annullato</translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilterOptions</name>
<message>
<source>Name:</source>
<translation>Nome:</translation>
@@ -8996,30 +8859,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<translation>Specifica la parola breve/abbreviazione che sarà usata per restringere il completamento ai file di queste cartelle.
Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da cercare nella casella di Ricerca Rapida.</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilter</name>
<message>
<source>Files in file system</source>
<translation>File nel file system</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilterOptions</name>
<message>
<source>Filter configuration</source>
<translation>Configurazione del filtro</translation>
</message>
<message>
<location/>
<source>Prefix:</source>
<translation>Prefisso:</translation>
</message>
<message>
<location/>
<source>Limit to prefix</source>
<translation>Limita al prefisso</translation>
</message>
<message>
<location/>
<source>Include hidden files</source>
@@ -9030,30 +8877,18 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
<source>Filter:</source>
<translation>Filtro:</translation>
</message>
</context>
<context>
<name>Locator::Internal::OpenDocumentsFilter</name>
<message>
<source>Open documents</source>
<translation>Documenti aperti</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorFiltersFilter</name>
<message>
<source>Available filters</source>
<translation>Filtri disponibili</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorPlugin</name>
<message>
<source>Indexing</source>
<translation>Indicizzazione</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorWidget</name>
<message>
<source>Refresh</source>
<translation>Aggiorna</translation>
@@ -9074,9 +8909,6 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
<source>&lt;type here&gt;</source>
<translation>&lt;scrivi qui&gt;</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsDialog</name>
<message>
<source>Configure Filters</source>
<translation>Configura i Filtri</translation>
@@ -9086,11 +8918,6 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
<source>Add</source>
<translation>Aggiungi</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Rimuovi</translation>
</message>
<message>
<location/>
<source> min</source>
@@ -9101,55 +8928,20 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
<source>Refresh now!</source>
<translation>Aggiorna adesso!</translation>
</message>
<message>
<location/>
<source>Edit...</source>
<translation>Modifica...</translation>
</message>
<message>
<location/>
<source>Refresh Interval:</source>
<translation>Intervallo di aggiornamento:</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsPage</name>
<message>
<source>%1 (Prefix: %2)</source>
<translation>%1 (Prefisso: %2)</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsWidget</name>
<message>
<source>Configure Filters</source>
<translation>Configura i Filtri</translation>
</message>
<message>
<location/>
<source>Add</source>
<translation>Aggiungi</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Rimuovi</translation>
</message>
<message>
<location/>
<source>Edit</source>
<translation>Modifica</translation>
</message>
<message>
<location/>
<source>Refresh Interval:</source>
<translation>Intervallo di aggiornamento:</translation>
</message>
<message>
<location/>
<source> min</source>
<translation> min</translation>
</message>
</context>
<context>
<name>RegExp::Internal::RegExpWindow</name>
@@ -11710,7 +11502,7 @@ p, li { white-space: pre-wrap; }
</message>
</context>
<context>
<name>Core::Internal::SettingsDialog</name>
<name>::Core</name>
<message>
<source>Preferences</source>
<translation type="unfinished"></translation>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -729,7 +729,7 @@
</message>
</context>
<context>
<name>Core::BaseFileWizard</name>
<name>::Core</name>
<message>
<source>File Generation Failure</source>
<translation>Napaka ustvarjanja datoteke</translation>
@@ -784,9 +784,6 @@ Would you like to overwrite them?</source>
%2.
Ali jih želite nadomestiti?</translation>
</message>
</context>
<context>
<name>Core::EditorManager</name>
<message>
<source>Revert to Saved</source>
<translation>Povrni na shranjeno</translation>
@@ -1015,53 +1012,6 @@ Ali jih želite nadomestiti?</translation>
<source>Alt+V,Alt+I</source>
<translation type="obsolete">Alt+V,Alt+I</translation>
</message>
<message>
<source>Cannot open file %1!</source>
<translation type="obsolete">Ni moč odpreti datoteke %1.</translation>
</message>
<message>
<source>File is Read Only</source>
<translation type="obsolete">Datoteka je samo za branje</translation>
</message>
<message>
<source>The file %1 is read only.</source>
<translation type="obsolete">Datoteka %1 je samo za branje.</translation>
</message>
<message>
<source>Open with VCS (%1)</source>
<translation type="obsolete">Odpri v sistemu za nadzor različic (%1)</translation>
</message>
<message>
<source>Save as ...</source>
<translation type="obsolete">Shrani kot </translation>
</message>
<message>
<source>Failed!</source>
<translation type="obsolete">Spodletelo.</translation>
</message>
<message>
<source>Could not set permissions to writable.</source>
<translation type="obsolete">Dovoljenj ni bilo moč nastaviti na zapisljivo.</translation>
</message>
<message>
<source>All Files (*)</source>
<translation type="obsolete">Vse datoteke (*)</translation>
</message>
<message>
<source>Could not open the file for editing with SCC.</source>
<translation type="obsolete">Ni bilo moč odpreti datoteke za urejanje v SCC.</translation>
</message>
<message>
<source>&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Expands to&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;file name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;current line number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;current column number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;editor&apos;s x position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;editor&apos;s y position on screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;editor&apos;s width in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;editor&apos;s height in pixels&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;editor&apos;s width in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;editor&apos;s height in characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
<translation type="obsolete">&lt;table border=1 cellspacing=0 cellpadding=3&gt;&lt;tr&gt;&lt;th&gt;Spremenljivka&lt;/th&gt;&lt;th&gt;Se razširi v&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%f&lt;/td&gt;&lt;td&gt;ime datoteke&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%l&lt;/td&gt;&lt;td&gt;številko trenutne vrstice&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%c&lt;/td&gt;&lt;td&gt;številko trenutnega stolpca&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%x&lt;/td&gt;&lt;td&gt;urejevalnikov vodoravni položaj na zaslonu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%y&lt;/td&gt;&lt;td&gt;urejevalnikov navpični položaj na zaslonu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%w&lt;/td&gt;&lt;td&gt;urejevalnikovo širino v pikah&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%h&lt;/td&gt;&lt;td&gt;urejevalnikovo višino v pikah&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%W&lt;/td&gt;&lt;td&gt;urejevalnikovo širino v znakih&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%H&lt;/td&gt;&lt;td&gt;urejevalnikovo višino v znakih&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;%%&lt;/td&gt;&lt;td&gt;%&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
</message>
</context>
<context>
<name>Core::FileManager</name>
<message>
<source>File Error</source>
<translation>Napaka glede datoteke</translation>
</message>
<message>
<source>Overwrite?</source>
<translation>Nadomestim?</translation>
@@ -1090,10 +1040,6 @@ Ali jih želite nadomestiti?</translation>
<source>Open with VCS (%1)</source>
<translation>Odpri v sistemu za nadzor različic (%1)</translation>
</message>
<message>
<source>Make writable</source>
<translation>Spremeni v zapisljivo</translation>
</message>
<message>
<source>Save as...</source>
<translation>Shrani kot ...</translation>
@@ -1110,16 +1056,6 @@ Ali jih želite nadomestiti?</translation>
<source>Cannot save changes to &apos;%1&apos;. Do you want to continue and lose your changes?</source>
<translation type="obsolete">Ni moč shraniti sprememb v »%1«. Ali želite nadaljevati in izgubiti svoje spremembe?</translation>
</message>
</context>
<context>
<name>Core::Internal::EditMode</name>
<message>
<source>Edit</source>
<translation>Urejanje</translation>
</message>
</context>
<context>
<name>Core::Internal::GeneralSettings</name>
<message>
<source>General</source>
<translation>Splošno</translation>
@@ -1255,13 +1191,6 @@ Ali jih želite nadomestiti?</translation>
<source>Default file encoding: </source>
<translation type="obsolete">Privzeti nabor znakov za datoteke: </translation>
</message>
</context>
<context>
<name>Core::Internal::MainWindow</name>
<message>
<source>Qt Creator</source>
<translation>Qt Creator</translation>
</message>
<message>
<source>&amp;File</source>
<translation>&amp;Datoteka</translation>
@@ -1407,27 +1336,10 @@ Ali jih želite nadomestiti?</translation>
<source>&amp;Select All</source>
<translation type="obsolete">&amp;Izberi vse</translation>
</message>
</context>
<context>
<name>Core::Internal::MessageOutputWindow</name>
<message>
<source>General Messages</source>
<translation>Splošna sporočila</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationSubWidget</name>
<message>
<source>Split</source>
<translation>Razdeli</translation>
</message>
<message>
<source>Close</source>
<translation>Zapri</translation>
</message>
</context>
<context>
<name>Core::Internal::NewDialog</name>
<message>
<source>New Project</source>
<translation>Nov projekt</translation>
@@ -1449,9 +1361,6 @@ Ali jih želite nadomestiti?</translation>
<source>Files and Classes</source>
<translation>Datoteke in razredi</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWidget</name>
<message>
<source>Open Documents</source>
<translation>Odprti dokumenti</translation>
@@ -1476,31 +1385,14 @@ Ali jih želite nadomestiti?</translation>
<source>Close All Editors</source>
<translation>Zapri vse urejevalnike</translation>
</message>
<message>
<source>Close %1</source>
<translation type="obsolete">Zapri %1</translation>
</message>
<message>
<source>Close All Except %1</source>
<translation type="obsolete">Zapri vse, razen %1</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWindow</name>
<message>
<source>*</source>
<translation>*</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenWithDialog</name>
<message>
<source>Open file &apos;%1&apos; with:</source>
<translation>Odpri datoteko »%1« v:</translation>
</message>
</context>
<context>
<name>Core::Internal::OutputPaneManager</name>
<message>
<source>Output</source>
<translation>Izhod</translation>
@@ -1529,9 +1421,6 @@ Ali jih želite nadomestiti?</translation>
<source>Minimize Output Pane</source>
<translation>Pomanjšaj podokno z izhodom</translation>
</message>
</context>
<context>
<name>Core::Internal::PluginDialog</name>
<message>
<source>Details</source>
<translation>Podrobnosti</translation>
@@ -1542,10 +1431,6 @@ Ali jih želite nadomestiti?</translation>
</translatorcomment>
<translation>Podrobnosti napake</translation>
</message>
<message>
<source>Close</source>
<translation>Zapri</translation>
</message>
<message>
<source>Restart required.</source>
<translation>Potreben je ponovni zagon.</translation>
@@ -1562,16 +1447,10 @@ Ali jih želite nadomestiti?</translation>
<source>Plugin Errors of %1</source>
<translation>Napake vstavka %1</translation>
</message>
</context>
<context>
<name>Core::Internal::ProgressView</name>
<message>
<source>Processes</source>
<translation>Procesi</translation>
</message>
</context>
<context>
<name>Core::Internal::SaveItemsDialog</name>
<message>
<source>Do not Save</source>
<translation>Ne shrani</translation>
@@ -1588,9 +1467,6 @@ Ali jih želite nadomestiti?</translation>
<source>Save Selected</source>
<translation>Shrani izbrane</translation>
</message>
</context>
<context>
<name>Core::Internal::ShortcutSettings</name>
<message>
<source>Keyboard</source>
<translation>Tipkovnica</translation>
@@ -1619,20 +1495,6 @@ Ali jih želite nadomestiti?</translation>
<source>Export Keyboard Mapping Scheme</source>
<translation>Izvozi shemo preslikave tipkovnice</translation>
</message>
</context>
<context>
<name>Core::Internal::SideBarWidget</name>
<message>
<source>Split</source>
<translation>Razdeli</translation>
</message>
<message>
<source>Close</source>
<translation>Zapri</translation>
</message>
</context>
<context>
<name>Core::Internal::VersionDialog</name>
<message>
<source>About Qt Creator</source>
<translation>O Qt Creatorju</translation>
@@ -1651,16 +1513,10 @@ Ali jih želite nadomestiti?</translation>
<source>&lt;h3&gt;Qt Creator %1 %8&lt;/h3&gt;Based on Qt %2 (%3 bit)&lt;br/&gt;&lt;br/&gt;Built on %4 at %5&lt;br /&gt;&lt;br/&gt;%9&lt;br/&gt;Copyright 2008-%6 %7. All rights reserved.&lt;br/&gt;&lt;br/&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;br/&gt;</source>
<translation>&lt;h3&gt;Qt Creator %1 %8&lt;/h3&gt;Temelji na Qt %2 (%3-biten)&lt;br/&gt;&lt;br/&gt;Zgrajen dne %4 ob %5&lt;br /&gt;&lt;br/&gt;%9&lt;br/&gt;Avtorske pravice © 2008%6 %7. Vse pravice pridržane.&lt;br/&gt;&lt;br/&gt;Prevedel: &lt;a href=&quot;mailto:jlp@holodeck1.com&quot;&gt;Jure Repinc&lt;/a&gt;, &lt;a href=&quot;http://www.lugos.si/&quot;&gt;LUGOS&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Program je na voljo KOT TAK, BREZ KAKRŠNEGAKOLI JAMSTVA, niti jamstva USTREZNOSTI ZA PRODAJO niti PRIMERNOSTI ZA UPORABO.&lt;br/&gt;</translation>
</message>
</context>
<context>
<name>Core::ModeManager</name>
<message>
<source>Switch to &lt;b&gt;%1&lt;/b&gt; mode</source>
<translation>Preklopi v način &lt;b&gt;%1&lt;/b&gt;</translation>
</message>
</context>
<context>
<name>Core::ScriptManager</name>
<message>
<source>Exception at line %1: %2
%3</source>
@@ -1671,9 +1527,6 @@ Ali jih želite nadomestiti?</translation>
<source>Unknown error</source>
<translation>Neznana napaka</translation>
</message>
</context>
<context>
<name>Core::StandardFileWizard</name>
<message>
<source>New %1</source>
<translatorcomment>TODO: Grammatical case problem
@@ -6431,7 +6284,7 @@ enojen »Vstopi« za oddajo signala pa vas bo privedel neposredno do ustrezne pr
</message>
</context>
<context>
<name>Locator</name>
<name>::Core</name>
<message>
<source>Filters</source>
<translation>Filtri</translation>
@@ -7375,7 +7228,7 @@ enojen »Vstopi« za oddajo signala pa vas bo privedel neposredno do ustrezne pr
</message>
</context>
<context>
<name>Core::FolderNavigationWidgetFactory</name>
<name>::Core</name>
<message>
<source>File System</source>
<translation>Datotečni sistem</translation>
@@ -11022,7 +10875,7 @@ p, li { white-space: pre-wrap; }
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilterOptions</name>
<name>::Core</name>
<message>
<source>Name:</source>
<translation>Ime:</translation>
@@ -11032,11 +10885,6 @@ p, li { white-space: pre-wrap; }
<source>Specify file name filters, separated by comma. Filters may contain wildcards.</source>
<translation>Določite filtre imen datotek, ločenih z vejico. Filtri lahko vsebujejo nadomestitelje.</translation>
</message>
<message>
<location/>
<source>Prefix:</source>
<translation>Predpona:</translation>
</message>
<message>
<location/>
<source>Specify a short word/abbreviation that can be used to restrict completions to files from this directory tree.
@@ -11044,11 +10892,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<translation>Določite kratko besedo ali okrajšavo, ki se lahko uporabi za omejitev dokončevanja za datoteke iz tega drevesa map.
Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskano besedo.</translation>
</message>
<message>
<location/>
<source>Limit to prefix</source>
<translation>Omeji na predpono</translation>
</message>
<message>
<location/>
<source>Remove</source>
@@ -11069,11 +10912,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
<location/>
<source>Edit</source>
<translation>Uredi</translation>
</message>
<message>
<source>Add...</source>
<translation type="obsolete">Dodaj </translation>
@@ -11082,23 +10920,10 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Edit...</source>
<translation type="obsolete">Urejanje </translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilterOptions</name>
<message>
<source>Filter configuration</source>
<translation>Nastavitev filtra</translation>
</message>
<message>
<location/>
<source>Prefix:</source>
<translation>Predpona:</translation>
</message>
<message>
<location/>
<source>Limit to prefix</source>
<translation>Omeji na predpono</translation>
</message>
<message>
<location/>
<source>Include hidden files</source>
@@ -11109,23 +10934,10 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Filter:</source>
<translation>Filter:</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsWidget</name>
<message>
<source>Configure Filters</source>
<translation>Nastavitev filtrov</translation>
</message>
<message>
<location/>
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Odstrani</translation>
</message>
<message>
<location/>
<source>Edit</source>
@@ -11947,7 +11759,7 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
</message>
</context>
<context>
<name>Core::Internal::SettingsDialog</name>
<name>::Core</name>
<message>
<source>Preferences</source>
<translation>Nastavitve</translation>
@@ -12543,7 +12355,7 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilter</name>
<name>::Core</name>
<message>
<source>Generic Directory Filter</source>
<translation>Splošen filter map</translation>
@@ -12573,9 +12385,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>%1 filter update: canceled</source>
<translation>Posodobitev filtra %1: preklicana</translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilter</name>
<message>
<source>Files in File System</source>
<translation>Datoteke v datotečnem sistemu</translation>
@@ -12584,13 +12393,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Files in file system</source>
<translation type="obsolete">Datoteke v datotečnem sistemu</translation>
</message>
</context>
<context>
<name>Locator::ILocatorFilter</name>
<message>
<source>Filter Configuration</source>
<translation>Nastavitev filtrov</translation>
</message>
<message>
<source>Limit to prefix</source>
<translation>Omeji na predpono</translation>
@@ -12599,16 +12401,10 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Prefix:</source>
<translation>Predpona:</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorFiltersFilter</name>
<message>
<source>Available filters</source>
<translation>Razpoložljivi filtri</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorPlugin</name>
<message>
<source>Type to locate</source>
<translation>Tipkajte za iskanje</translation>
@@ -12621,47 +12417,18 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>Indexing</source>
<translation>Indeksiranje</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorWidget</name>
<message>
<source>Refresh</source>
<translation>Osveži</translation>
</message>
<message>
<source>Configure...</source>
<translation>Nastavitve </translation>
</message>
<message>
<source>Locate...</source>
<translation>Lociraj </translation>
</message>
<message>
<source>Options</source>
<translation>Možnosti</translation>
</message>
<message>
<source>&lt;type here&gt;</source>
<translation>&lt;tipkajte sem&gt;</translation>
</message>
<message>
<source>Type to locate</source>
<translation type="obsolete">Tipkajte za lociranje</translation>
</message>
</context>
<context>
<name>Locator::Internal::OpenDocumentsFilter</name>
<message>
<source>Open Documents</source>
<translation>Odprti dokumenti</translation>
</message>
<message>
<source>Open documents</source>
<translation type="obsolete">Odprti dokumenti</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsPage</name>
<message>
<source>%1 (prefix: %2)</source>
<translation>%1 (predpona: %2)</translation>
@@ -15200,7 +14967,7 @@ Desetiška predznačena vrednost (najprej veliki konec): %4</translation>
</message>
</context>
<context>
<name>Core::CommandMappings</name>
<name>::Core</name>
<message>
<source>Command</source>
<translation>Ukaz</translation>
@@ -15209,9 +14976,6 @@ Desetiška predznačena vrednost (najprej veliki konec): %4</translation>
<source>Label</source>
<translation>Oznaka</translation>
</message>
</context>
<context>
<name>::Core</name>
<message>
<source>Qt</source>
<translation>Qt</translation>
@@ -15228,38 +14992,22 @@ Desetiška predznačena vrednost (najprej veliki konec): %4</translation>
<source>Clear Menu</source>
<translation>Počisti meni</translation>
</message>
</context>
<context>
<name>Core::DesignMode</name>
<message>
<source>Design</source>
<translation>Oblikovanje</translation>
</message>
</context>
<context>
<name>Core::Internal::SystemEditor</name>
<message>
<source>Could not open url %1.</source>
<translation>Ni bilo moč odpreti URL-ja %1.</translation>
</message>
</context>
<context>
<name>Core::EditorToolBar</name>
<message>
<source>Copy Full Path to Clipboard</source>
<translation>Skopiraj celotno pot na odložišče</translation>
</message>
<message>
<source>Make writable</source>
<translation>Spremeni v zapisljivo</translation>
</message>
<message>
<source>File is writable</source>
<translation>Datoteka je zapisljiva</translation>
</message>
</context>
<context>
<name>Core::HelpManager</name>
<message>
<source>Unfiltered</source>
<translation>Nefiltrirano</translation>
@@ -16214,7 +15962,7 @@ Desetiška predznačena vrednost (najprej veliki konec): %4</translation>
</message>
</context>
<context>
<name>Core::FolderNavigationWidget</name>
<name>::Core</name>
<message>
<source>Open</source>
<translation>Odpri</translation>
@@ -16283,10 +16031,6 @@ Desetiška predznačena vrednost (najprej veliki konec): %4</translation>
%2</translation>
</message>
<message>
<source>Settings...</source>
<translation>Nastavitve </translation>
</message>
<message>
<source>Launching Windows Explorer Failed</source>
<translation>Zaganjanje Windows Explorer-ja ni uspelo</translation>
@@ -18216,7 +17960,7 @@ Krajevnih potegov se v vejo »master« ne uveljavi.</translation>
</message>
</context>
<context>
<name>Core::ExternalToolConfig</name>
<name>::Core</name>
<message>
<source>Form</source>
<translation>Obrazec</translation>
@@ -18226,31 +17970,16 @@ Krajevnih potegov se v vejo »master« ne uveljavi.</translation>
<source>Add tool</source>
<translation>Dodaj orodje</translation>
</message>
<message>
<location/>
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
<location/>
<source>Remove tool</source>
<translation>Odstrani orodje</translation>
</message>
<message>
<location/>
<source>Remove</source>
<translation>Odstrani</translation>
</message>
<message>
<location/>
<source>Revert tool to default</source>
<translation>Povrni orodje na privzeto</translation>
</message>
<message>
<location/>
<source>Reset</source>
<translation>Ponastavi</translation>
</message>
<message>
<location/>
<source>Description:</source>
@@ -18475,11 +18204,7 @@ Krajevnih potegov se v vejo »master« ne uveljavi.</translation>
</message>
</context>
<context>
<name>Core::VariableChooser</name>
<message>
<source>Variables</source>
<translation>Spremenljivke</translation>
</message>
<name>::Core</name>
<message>
<location/>
<source>Select a variable to insert.</source>
@@ -22295,7 +22020,7 @@ Seznam za strežnik je: %2.</translation>
</message>
</context>
<context>
<name>Core::Internal::ExternalToolModel</name>
<name>::Core</name>
<message>
<source>Uncategorized</source>
<translation>Brez kategorije</translation>
@@ -22324,9 +22049,6 @@ Seznam za strežnik je: %2.</translation>
<source>Useful text</source>
<translation>Uporabno besedilo</translation>
</message>
</context>
<context>
<name>Core::Internal::PromptOverwriteDialog</name>
<message>
<source>Overwrite Existing Files</source>
<translation>Nadomesti obstoječe datoteke</translation>
@@ -22364,7 +22086,7 @@ Ali jih želite nadomestiti?</translation>
</message>
</context>
<context>
<name>Core::Internal::ExternalToolRunner</name>
<name>::Core</name>
<message>
<source>Could not find executable for &apos;%1&apos; (expanded &apos;%2&apos;)
</source>
@@ -22379,9 +22101,6 @@ Ali jih želite nadomestiti?</translation>
<source>&apos;%1&apos; finished</source>
<translation>»%1« je zaključil</translation>
</message>
</context>
<context>
<name>Core::ExternalToolManager</name>
<message>
<source>Configure...</source>
<translation>Nastavi ...</translation>
@@ -22398,23 +22117,10 @@ Ali jih želite nadomestiti?</translation>
<source>Error: External tool in %1 has duplicate id</source>
<translation>Napaka: zunanje orodje v %1 ima podvojeno identifikacijo</translation>
</message>
</context>
<context>
<name>Core::IFile</name>
<message>
<source>File was restored from auto-saved copy. Use &lt;i&gt;Save&lt;/i&gt; to confirm, or &lt;i&gt;Revert to Saved&lt;/i&gt; to discard changes.</source>
<translation>Datoteka je bila obnovljena iz samodejno shranjene kopije. Za potrditev kliknite &lt;i&gt;Shrani&lt;/i&gt;, za zavrnitev sprememb pa &lt;i&gt;Povrni na shranjeno&lt;/i&gt;.</translation>
</message>
</context>
<context>
<name>Core::InfoBarDisplay</name>
<message>
<source>Close</source>
<translation>Zapri</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeMagicDialog</name>
<message>
<source>Magic Header</source>
<translation>Rokovalnik z značilkami</translation>
@@ -22427,9 +22133,6 @@ Ali jih želite nadomestiti?</translation>
<source>Not a valid byte pattern.</source>
<translation>Vzorec bajtov ni veljaven.</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettingsModel</name>
<message>
<source>MIME Type</source>
<translation>Zvrst MIME</translation>
@@ -22459,13 +22162,6 @@ Ali jih želite nadomestiti?</translation>
<numerusform>%n vzorcev je že v uporabi.</numerusform>
</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettingsPrivate</name>
<message>
<source>Error</source>
<translation>Napaka</translation>
</message>
<message>
<source>No MIME type selected.</source>
<translation>Izbrana ni nobena zvrst MIME.</translation>
@@ -22482,23 +22178,6 @@ Ali jih želite nadomestiti?</translation>
<source>Changes will take effect in the next time you start Qt Creator.</source>
<translation>Spremembe bodo stopile v veljavo z naslednjim zagonom Qt Creatorja.</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettings</name>
<message>
<source>MIME Types</source>
<translation>Zvrsti MIME</translation>
</message>
</context>
<context>
<name>Core::Internal::CommandComboBox</name>
<message>
<source>Activate %1 Pane</source>
<translation>Aktiviraj podokno %1</translation>
</message>
</context>
<context>
<name>Core::NavigationWidget</name>
<message>
<source>Activate %1 Pane</source>
<translation>Aktiviraj podokno %1</translation>
@@ -22507,29 +22186,16 @@ Ali jih želite nadomestiti?</translation>
<source>Hide Sidebar</source>
<translation>Skrij stranski pas</translation>
</message>
<message>
<source>Show Sidebar</source>
<translation>Prikaži stranski pas</translation>
</message>
</context>
<context>
<name>Core::OutputWindow</name>
<message>
<source>Additional output omitted
</source>
<translation>Nekaj izhoda je bilo izpuščenega
</translation>
</message>
</context>
<context>
<name>Core::Internal::ToolSettings</name>
<message>
<source>External Tools</source>
<translation>Zunanja orodja</translation>
</message>
</context>
<context>
<name>Core::VcsManager</name>
<message>
<source>Version Control</source>
<translation>Nadzor različic</translation>
@@ -29204,105 +28870,6 @@ Preverite pravice za dostop do mape.</translation>
<translation>Med usklajevanjem na waitForBytesWritten za %1 je prišlo do napake: %1</translation>
</message>
</context>
<context>
<name>Core::Internal::ComboBox</name>
<message>
<source>Activate %1</source>
<translation type="obsolete">Aktiviraj %1</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorSplitter</name>
<message>
<source>Split Left/Right</source>
<translation type="obsolete">Razdeli levo/desno</translation>
</message>
<message>
<source>Split Top/Bottom</source>
<translation type="obsolete">Razdeli zgoraj/spodaj</translation>
</message>
<message>
<source>Unsplit</source>
<translation type="obsolete">Odstrani razdelitev</translation>
</message>
<message>
<source>Default Splitter Layout</source>
<translation type="obsolete">Privzeta postavitev delitelja</translation>
</message>
<message>
<source>Save Current as Default</source>
<translation type="obsolete">Shrani trenutno kot privzeto</translation>
</message>
<message>
<source>Restore Default Layout</source>
<translation type="obsolete">Obnovi privzeto postavitev</translation>
</message>
<message>
<source>Previous Document</source>
<translation type="obsolete">Predhodni dokument</translation>
</message>
<message>
<source>Alt+Left</source>
<translation type="obsolete">Alt+Left</translation>
</message>
<message>
<source>Next Document</source>
<translation type="obsolete">Naslednji dokument</translation>
</message>
<message>
<source>Alt+Right</source>
<translation type="obsolete">Alt+Right</translation>
</message>
<message>
<source>Previous Group</source>
<translation type="obsolete">Predhodna skupina</translation>
</message>
<message>
<source>Next Group</source>
<translation type="obsolete">Naslednja skupina</translation>
</message>
<message>
<source>Move Document to Previous Group</source>
<translation type="obsolete">Premakni dokument v predhodno skupino</translation>
</message>
<message>
<source>Move Document to Next Group</source>
<translation type="obsolete">Premakni dokument v naslednjo skupino</translation>
</message>
</context>
<context>
<name>Core::Internal::EditorView</name>
<message>
<source>Placeholder</source>
<translation type="obsolete">Vsebnik</translation>
</message>
<message>
<source>Close</source>
<translation type="obsolete">Zapri</translation>
</message>
</context>
<context>
<name>Core::Internal::NavComboBox</name>
<message>
<source>Activate %1</source>
<translation type="obsolete">Aktiviraj %1</translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationWidget</name>
<message>
<source>Hide Sidebar</source>
<translation type="obsolete">Skrij stranski pas</translation>
</message>
<message>
<source>Show Sidebar</source>
<translation type="obsolete">Prikaži stranski pas</translation>
</message>
<message>
<source>Activate %1 Pane</source>
<translation type="obsolete">Aktiviraj podokno %1</translation>
</message>
</context>
<context>
<name>::CppEditor</name>
<message>
@@ -31487,14 +31054,11 @@ Preverite, ali je telefon priključen in ali App TRK teče.</translation>
</message>
</context>
<context>
<name>Core::InteractiveSshConnection</name>
<name>::Core</name>
<message>
<source>Error sending input</source>
<translation type="obsolete">Napaka pri pošiljanju vhoda</translation>
</message>
</context>
<context>
<name>Core::SftpConnection</name>
<message>
<source>Error setting up SFTP subsystem</source>
<translation type="obsolete">Napaka pri nastavljanju podsistema SFTP</translation>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -400,7 +400,7 @@
</message>
</context>
<context>
<name>Core::BaseFileWizard</name>
<name>::Core</name>
<message>
<source>File Generation Failure</source>
<translation></translation>
@@ -431,9 +431,6 @@
<translation> %1 :
%2</translation>
</message>
</context>
<context>
<name>Core::EditorManager</name>
<message>
<source>Revert to Saved</source>
<translation></translation>
@@ -702,16 +699,10 @@
<source>Cancel</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::EditMode</name>
<message>
<source>Edit</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::GeneralSettings</name>
<message>
<source>General</source>
<translation></translation>
@@ -812,13 +803,6 @@
<extracomment>unit for minutes</extracomment>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::MainWindow</name>
<message>
<source>Qt Creator</source>
<translation>Qt Creator</translation>
</message>
<message>
<source>Exit Full Screen</source>
<translation type="unfinished"></translation>
@@ -959,10 +943,6 @@
<source>Zoom</source>
<translation></translation>
</message>
<message>
<source>Show Sidebar</source>
<translation></translation>
</message>
<message>
<source>Ctrl+0</source>
<translation>Ctrl+0</translation>
@@ -1008,27 +988,10 @@
<source>Settings...</source>
<translation>...</translation>
</message>
</context>
<context>
<name>Core::Internal::MessageOutputWindow</name>
<message>
<source>General Messages</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::NavigationSubWidget</name>
<message>
<source>Split</source>
<translation></translation>
</message>
<message>
<source>Close</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::NewDialog</name>
<message>
<source>New Project</source>
<translation></translation>
@@ -1065,23 +1028,14 @@
<source>Supported Platforms</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWidget</name>
<message>
<source>Open Documents</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsWindow</name>
<message>
<source>*</source>
<translation>*</translation>
</message>
</context>
<context>
<name>Core::Internal::OpenWithDialog</name>
<message>
<source>Open file &apos;%1&apos; with:</source>
<translation> &apos;%1&apos; </translation>
@@ -1094,9 +1048,6 @@
<source>Open file extension with:</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::OutputPaneManager</name>
<message>
<source>Output</source>
<translation></translation>
@@ -1141,9 +1092,6 @@
<source>Output &amp;Panes</source>
<translation>(&amp;P)</translation>
</message>
</context>
<context>
<name>Core::Internal::PluginDialog</name>
<message>
<source>Details</source>
<translation></translation>
@@ -1152,10 +1100,6 @@
<source>Error Details</source>
<translation></translation>
</message>
<message>
<source>Close</source>
<translation></translation>
</message>
<message>
<source>Restart required.</source>
<translation></translation>
@@ -1172,16 +1116,10 @@
<source>Plugin Errors of %1</source>
<translation>%1 </translation>
</message>
</context>
<context>
<name>Core::Internal::ProgressView</name>
<message>
<source>Processes</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::SaveItemsDialog</name>
<message>
<source>Do not Save</source>
<translation></translation>
@@ -1190,10 +1128,6 @@
<source>Save All</source>
<translation></translation>
</message>
<message>
<source>Save</source>
<translation></translation>
</message>
<message>
<source>Save Selected</source>
<translation></translation>
@@ -1210,9 +1144,6 @@
<source>Automatically save all files before building</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::ShortcutSettings</name>
<message>
<source>Keyboard</source>
<translation></translation>
@@ -1241,20 +1172,6 @@
<source>Export Keyboard Mapping Scheme</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::SideBarWidget</name>
<message>
<source>Split</source>
<translation></translation>
</message>
<message>
<source>Close</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::VersionDialog</name>
<message>
<source>About Qt Creator</source>
<translation> Qt Creator</translation>
@@ -1272,16 +1189,10 @@
<source>&lt;h3&gt;Qt Creator %1 %8&lt;/h3&gt;Based on Qt %2 (%3 bit)&lt;br/&gt;&lt;br/&gt;Built on %4 at %5&lt;br /&gt;&lt;br/&gt;%9&lt;br/&gt;Copyright 2008-%6 %7. All rights reserved.&lt;br/&gt;&lt;br/&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;br/&gt;</source>
<translation>&lt;h3&gt;Qt Creator %1 %8&lt;/h3&gt;基於 Qt %2 (%3 bit)&lt;br/&gt;&lt;br/&gt; %5 %4 &lt;br /&gt;&lt;br/&gt;%9&lt;br/&gt;Copyright 2008-%6 %7. &lt;br/&gt;&lt;br/&gt;As-isMerchantability&lt;br/&gt;</translation>
</message>
</context>
<context>
<name>Core::ModeManager</name>
<message>
<source>Switch to &lt;b&gt;%1&lt;/b&gt; mode</source>
<translation> &lt;b&gt;%1&lt;/b&gt; </translation>
</message>
</context>
<context>
<name>Core::ScriptManager</name>
<message>
<source>Exception at line %1: %2
%3</source>
@@ -1291,9 +1202,6 @@
<source>Unknown error</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::StandardFileWizard</name>
<message>
<source>New %1</source>
<translation> %1 </translation>
@@ -5952,7 +5860,7 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>Locator</name>
<name>::Core</name>
<message>
<source>Locator</source>
<translation></translation>
@@ -6803,7 +6711,7 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>Core::FolderNavigationWidgetFactory</name>
<name>::Core</name>
<message>
<source>File System</source>
<translation></translation>
@@ -8156,7 +8064,7 @@ Preselects a desktop Qt for building the application if available.</source>
</message>
</context>
<context>
<name>Locator::ILocatorFilter</name>
<name>::Core</name>
<message>
<source>Filter Configuration</source>
<translation></translation>
@@ -8169,17 +8077,10 @@ Preselects a desktop Qt for building the application if available.</source>
<source>Prefix:</source>
<translation></translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilter</name>
<message>
<source>Generic Directory Filter</source>
<translation></translation>
</message>
<message>
<source>Filter Configuration</source>
<translation></translation>
</message>
<message>
<source>Select Directory</source>
<translation></translation>
@@ -8198,9 +8099,6 @@ Preselects a desktop Qt for building the application if available.</source>
<source>%1 filter update: canceled</source>
<translation>%1 </translation>
</message>
</context>
<context>
<name>Locator::Internal::DirectoryFilterOptions</name>
<message>
<source>Name:</source>
<translation></translation>
@@ -8209,14 +8107,6 @@ Preselects a desktop Qt for building the application if available.</source>
<source>Specify file name filters, separated by comma. Filters may contain wildcards.</source>
<translation></translation>
</message>
<message>
<source>Prefix:</source>
<translation></translation>
</message>
<message>
<source>Limit to prefix</source>
<translation></translation>
</message>
<message>
<source>Remove</source>
<translation></translation>
@@ -8239,32 +8129,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<source>Add</source>
<translation></translation>
</message>
<message>
<source>Edit</source>
<translation></translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilter</name>
<message>
<source>Files in File System</source>
<translation></translation>
</message>
</context>
<context>
<name>Locator::Internal::FileSystemFilterOptions</name>
<message>
<source>Filter configuration</source>
<translation type="obsolete"></translation>
</message>
<message>
<source>Prefix:</source>
<translation></translation>
</message>
<message>
<source>Limit to prefix</source>
<translation></translation>
</message>
<message>
<source>Include hidden files</source>
<translation></translation>
@@ -8277,23 +8149,10 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<source>Add Filter Configuration</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Locator::Internal::OpenDocumentsFilter</name>
<message>
<source>Open Documents</source>
<translation></translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorFiltersFilter</name>
<message>
<source>Available filters</source>
<translation>使</translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorPlugin</name>
<message>
<source>Ctrl+K</source>
<translation>Ctrl+K</translation>
@@ -8310,9 +8169,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<source>Indexing</source>
<translation></translation>
</message>
</context>
<context>
<name>Locator::Internal::LocatorWidget</name>
<message>
<source>Refresh</source>
<translation></translation>
@@ -8333,32 +8189,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<source>&lt;type here&gt;</source>
<translation>&lt;&gt;</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsPage</name>
<message>
<source>%1 (prefix: %2)</source>
<translation>%1 (%2)</translation>
</message>
</context>
<context>
<name>Locator::Internal::SettingsWidget</name>
<message>
<source>Configure Filters</source>
<translation></translation>
</message>
<message>
<source>Add</source>
<translation></translation>
</message>
<message>
<source>Remove</source>
<translation></translation>
</message>
<message>
<source>Edit</source>
<translation></translation>
</message>
<message>
<source> min</source>
<translation> </translation>
@@ -10425,15 +10263,11 @@ Will not be applied to whitespace in comments and strings.</source>
</message>
</context>
<context>
<name>Core::Internal::SettingsDialog</name>
<name>::Core</name>
<message>
<source>Preferences</source>
<translation></translation>
</message>
<message>
<source>Options</source>
<translation></translation>
</message>
</context>
<context>
<name>::CodePaster</name>
@@ -12633,7 +12467,7 @@ For qmlproject projects, use the importPaths property to add import paths.</sour
</message>
</context>
<context>
<name>Core::CommandMappings</name>
<name>::Core</name>
<message>
<source>Command</source>
<translation></translation>
@@ -12642,27 +12476,14 @@ For qmlproject projects, use the importPaths property to add import paths.</sour
<source>Label</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::DesignMode</name>
<message>
<source>Design</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::SystemEditor</name>
<message>
<source>Could not open url %1.</source>
<translation> %1</translation>
</message>
</context>
<context>
<name>Core::EditorToolBar</name>
<message>
<source>Split</source>
<translation></translation>
</message>
<message>
<source>Copy Full Path to Clipboard</source>
<translation>簿</translation>
@@ -12671,10 +12492,6 @@ For qmlproject projects, use the importPaths property to add import paths.</sour
<source>Remove Split</source>
<translation></translation>
</message>
<message>
<source>Make Writable</source>
<translation></translation>
</message>
<message>
<source>File is writable</source>
<translation></translation>
@@ -13189,11 +13006,7 @@ For qmlproject projects, use the importPaths property to add import paths.</sour
</message>
</context>
<context>
<name>Core::FolderNavigationWidget</name>
<message>
<source>Open</source>
<translation></translation>
</message>
<name>::Core</name>
<message>
<source>Open &quot;%1&quot;</source>
<translation> &quot;%1&quot;</translation>
@@ -15128,7 +14941,7 @@ Ids must begin with a lowercase letter.</source>
</message>
</context>
<context>
<name>Core::HelpManager</name>
<name>::Core</name>
<message>
<source>Unfiltered</source>
<translation></translation>
@@ -15620,14 +15433,7 @@ Ids must begin with a lowercase letter.</source>
</message>
</context>
<context>
<name>Core::Internal::CommandComboBox</name>
<message>
<source>Activate %1 Pane</source>
<translation> %1 </translation>
</message>
</context>
<context>
<name>Core::NavigationWidget</name>
<name>::Core</name>
<message>
<source>Activate %1 Pane</source>
<translation> %1 </translation>
@@ -17810,7 +17616,7 @@ Local pulls are not applied to the master branch.</source>
</message>
</context>
<context>
<name>Core::ExternalToolConfig</name>
<name>::Core</name>
<message>
<source>Form</source>
<translation></translation>
@@ -17819,26 +17625,14 @@ Local pulls are not applied to the master branch.</source>
<source>Add tool</source>
<translation></translation>
</message>
<message>
<source>Add</source>
<translation></translation>
</message>
<message>
<source>Remove tool</source>
<translation></translation>
</message>
<message>
<source>Remove</source>
<translation></translation>
</message>
<message>
<source>Revert tool to default</source>
<translation></translation>
</message>
<message>
<source>Reset</source>
<translation></translation>
</message>
<message>
<source>Description:</source>
<translation></translation>
@@ -17923,9 +17717,6 @@ Local pulls are not applied to the master branch.</source>
<source>Add Category</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::VariableChooser</name>
<message>
<source>Insert variable</source>
<translation></translation>
@@ -18677,7 +18468,7 @@ Local pulls are not applied to the master branch.</source>
<name>::CMakeProjectManager</name>
</context>
<context>
<name>Core::Internal::ExternalToolModel</name>
<name>::Core</name>
<message>
<source>Uncategorized</source>
<translation></translation>
@@ -18703,9 +18494,6 @@ Local pulls are not applied to the master branch.</source>
<extracomment>Sample external tool text</extracomment>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::ExternalTool</name>
<message>
<source>Creates qm translation files that can be used by an application from the translator&apos;s ts files</source>
<translation> ts 使 qm </translation>
@@ -18766,9 +18554,6 @@ Local pulls are not applied to the master branch.</source>
<source>Edit with vi</source>
<translation>使 vi </translation>
</message>
</context>
<context>
<name>Core::Internal::ExternalToolRunner</name>
<message>
<source>Could not find executable for &apos;%1&apos; (expanded &apos;%2&apos;)
</source>
@@ -18783,13 +18568,6 @@ Local pulls are not applied to the master branch.</source>
<source>&apos;%1&apos; finished</source>
<translation>&apos;%1&apos; </translation>
</message>
</context>
<context>
<name>Core::ExternalToolManager</name>
<message>
<source>Configure...</source>
<translation>...</translation>
</message>
<message>
<source>&amp;External</source>
<translation>(&amp;E)</translation>
@@ -18802,13 +18580,6 @@ Local pulls are not applied to the master branch.</source>
<source>Error: External tool in %1 has duplicate id</source>
<translation> %1 </translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeMagicDialog</name>
<message>
<source>Magic Header</source>
<translation type="obsolete"></translation>
</message>
<message>
<source>Add Magic Header</source>
<translation type="unfinished"></translation>
@@ -18861,9 +18632,6 @@ Local pulls are not applied to the master branch.</source>
<source>&lt;i&gt;Note: Wide range values might impact Qt Creator&apos;s performance when opening files.&lt;/i&gt;</source>
<translation>&lt;i&gt; Qt Creator &lt;/i&gt;</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettingsModel</name>
<message>
<source>MIME Type</source>
<translation>MIME </translation>
@@ -18890,13 +18658,6 @@ Local pulls are not applied to the master branch.</source>
<numerusform>%n 使</numerusform>
</translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettingsPrivate</name>
<message>
<source>Error</source>
<translation></translation>
</message>
<message>
<source>No MIME type selected.</source>
<translation> MIME </translation>
@@ -18913,23 +18674,10 @@ Local pulls are not applied to the master branch.</source>
<source>Changes will take effect in the next time you start Qt Creator.</source>
<translation> Qt Creator </translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettings</name>
<message>
<source>MIME Types</source>
<translation>MIME </translation>
</message>
</context>
<context>
<name>Core::Internal::ToolSettings</name>
<message>
<source>External Tools</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::VcsManager</name>
<message>
<source>Version Control</source>
<translation></translation>
@@ -21676,7 +21424,7 @@ With cache simulation, further event counters are enabled:
</message>
</context>
<context>
<name>Core::Internal::PromptOverwriteDialog</name>
<name>::Core</name>
<message>
<source>Overwrite Existing Files</source>
<translation></translation>
@@ -21689,16 +21437,6 @@ Would you like to overwrite them?</source>
%1
</translation>
</message>
</context>
<context>
<name>Core::InfoBarDisplay</name>
<message>
<source>Close</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::OutputWindow</name>
<message>
<source>Additional output omitted
</source>
@@ -24274,7 +24012,7 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi
</message>
</context>
<context>
<name>Core::Internal</name>
<name>::Core</name>
<message>
<source>Launching a file browser failed</source>
<translation></translation>
@@ -24299,10 +24037,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi
%2</translation>
</message>
<message>
<source>Settings...</source>
<translation>...</translation>
</message>
<message>
<source>Launching Windows Explorer Failed</source>
<translation> Windows Explorer </translation>
@@ -24339,9 +24073,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi
<source>Could not delete file %1.</source>
<translation type="unfinished"> %1</translation>
</message>
</context>
<context>
<name>BaseFileWizard</name>
<message>
<source>Unable to create the directory %1.</source>
<translation> %1</translation>
@@ -25574,19 +25305,11 @@ Filter: %2
</message>
</context>
<context>
<name>Core::Internal::CommandMappings</name>
<name>::Core</name>
<message>
<source>Command Mappings</source>
<translation></translation>
</message>
<message>
<source>Command</source>
<translation></translation>
</message>
<message>
<source>Label</source>
<translation></translation>
</message>
<message>
<source>Target</source>
<translation></translation>
@@ -25619,17 +25342,6 @@ Filter: %2
<source>Reset to default</source>
<translation></translation>
</message>
<message>
<source>Reset</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::MimeTypeSettingsPage</name>
<message>
<source>Form</source>
<translation></translation>
</message>
<message>
<source>Registered MIME Types</source>
<translation> MIME </translation>
@@ -25638,14 +25350,6 @@ Filter: %2
<source>Reset all to default.</source>
<translation></translation>
</message>
<message>
<source>Reset All</source>
<translation></translation>
</message>
<message>
<source>Details</source>
<translation></translation>
</message>
<message>
<source>Patterns:</source>
<translation></translation>
@@ -25654,10 +25358,6 @@ Filter: %2
<source>Magic Header</source>
<translation></translation>
</message>
<message>
<source>Type</source>
<translation></translation>
</message>
<message>
<source>Range</source>
<translation></translation>
@@ -25674,17 +25374,6 @@ Filter: %2
<source>Edit...</source>
<translation>...</translation>
</message>
<message>
<source>Remove</source>
<translation></translation>
</message>
</context>
<context>
<name>Core::Internal::VariableChooser</name>
<message>
<source>Variables</source>
<translation></translation>
</message>
<message>
<source>Select a variable to insert.</source>
<translation></translation>
@@ -27643,11 +27332,7 @@ should a repository require SSH-authentication (see documentation on SSH and the
</message>
</context>
<context>
<name>Core::DocumentManager</name>
<message>
<source>File Error</source>
<translation></translation>
</message>
<name>::Core</name>
<message>
<source>Error while saving file: %1</source>
<translation>%1</translation>
@@ -27684,25 +27369,10 @@ should a repository require SSH-authentication (see documentation on SSH and the
<source>&amp;Save As...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Open with VCS (%1)</source>
<translation type="obsolete">使 VCS (%1)</translation>
</message>
<message>
<source>Make Writable</source>
<translation type="obsolete"></translation>
</message>
<message>
<source>Save As...</source>
<translation type="obsolete">...</translation>
</message>
<message>
<source>Cannot reload %1</source>
<translation> %1</translation>
</message>
</context>
<context>
<name>Core::IDocument</name>
<message>
<source>File was restored from auto-saved copy. Use &lt;i&gt;Save&lt;/i&gt; to confirm, or &lt;i&gt;Revert to Saved&lt;/i&gt; to discard changes.</source>
<translation type="obsolete">使&lt;i&gt;&lt;/i&gt;」來確認,或是用「&lt;i&gt;回復到已儲存&lt;/i&gt;</translation>
@@ -27887,7 +27557,7 @@ should a repository require SSH-authentication (see documentation on SSH and the
</message>
</context>
<context>
<name>Locator::Internal::ExecuteFilter</name>
<name>::Core</name>
<message>
<source>Previous command is still running (&apos;%1&apos;).
Do you want to kill it?</source>
@@ -28872,7 +28542,7 @@ This option is useful when you want to try your application on devices which don
</message>
</context>
<context>
<name>Core::RemoveFileDialog</name>
<name>::Core</name>
<message>
<source>Remove File</source>
<translation type="unfinished"></translation>
@@ -30254,7 +29924,7 @@ Please choose a valid package name for your application (e.g. &quot;org.example.
</message>
</context>
<context>
<name>Core::Internal::OpenEditorsViewFactory</name>
<name>::Core</name>
<message>
<source>Meta+O</source>
<translation type="unfinished"></translation>
@@ -30263,9 +29933,6 @@ Please choose a valid package name for your application (e.g. &quot;org.example.
<source>Alt+O</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core::IVersionControl</name>
<message>
<source>Open with VCS (%1)</source>
<translation type="unfinished">使 VCS (%1)</translation>

View File

@@ -96,9 +96,9 @@ void PresentationModeHandler::showShortcutPopup(const QString &shortcut)
your plugin's ExtensionSystem::IPlugin::initialize() function.
\code
QAction *myAction = new QAction(tr("My Action"), this);
QAction *myAction = new QAction(Tr::tr("My Action"), this);
Command *cmd = ActionManager::registerAction(myAction, "myplugin.myaction", Context(C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+u")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+u")));
connect(myAction, &QAction::triggered, this, &MyPlugin::performMyAction);
\endcode

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "commandmappings.h"
#include "commandsfile.h"
#include <coreplugin/coreplugintr.h>
#include <coreplugin/dialogs/shortcutsettings.h>
#include <utils/headerviewstretcher.h>
@@ -33,7 +33,7 @@ public:
: q(parent)
{
groupBox = new QGroupBox(parent);
groupBox->setTitle(CommandMappings::tr("Command Mappings"));
groupBox->setTitle(::Core::Tr::tr("Command Mappings"));
filterEdit = new FancyLineEdit(groupBox);
filterEdit->setFiltering(true);
@@ -45,19 +45,19 @@ public:
commandList->setColumnCount(3);
QTreeWidgetItem *item = commandList->headerItem();
item->setText(2, CommandMappings::tr("Target"));
item->setText(1, CommandMappings::tr("Label"));
item->setText(0, CommandMappings::tr("Command"));
item->setText(2, ::Core::Tr::tr("Target"));
item->setText(1, ::Core::Tr::tr("Label"));
item->setText(0, ::Core::Tr::tr("Command"));
defaultButton = new QPushButton(CommandMappings::tr("Reset All"), groupBox);
defaultButton->setToolTip(CommandMappings::tr("Reset all to default."));
defaultButton = new QPushButton(::Core::Tr::tr("Reset All"), groupBox);
defaultButton->setToolTip(::Core::Tr::tr("Reset all to default."));
resetButton = new QPushButton(CommandMappings::tr("Reset"), groupBox);
resetButton->setToolTip(CommandMappings::tr("Reset to default."));
resetButton = new QPushButton(::Core::Tr::tr("Reset"), groupBox);
resetButton->setToolTip(::Core::Tr::tr("Reset to default."));
resetButton->setVisible(false);
importButton = new QPushButton(CommandMappings::tr("Import..."), groupBox);
exportButton = new QPushButton(CommandMappings::tr("Export..."), groupBox);
importButton = new QPushButton(::Core::Tr::tr("Import..."), groupBox);
exportButton = new QPushButton(::Core::Tr::tr("Export..."), groupBox);
auto hboxLayout1 = new QHBoxLayout();
hboxLayout1->addWidget(defaultButton);
@@ -147,7 +147,7 @@ void CommandMappings::setPageTitle(const QString &s)
void CommandMappings::setTargetHeader(const QString &s)
{
d->commandList->setHeaderLabels({tr("Command"), tr("Label"), s});
d->commandList->setHeaderLabels({::Core::Tr::tr("Command"), ::Core::Tr::tr("Label"), s});
}
void CommandMappings::filterChanged(const QString &f)

View File

@@ -6,6 +6,7 @@
#include "actionmanager/actioncontainer.h"
#include "actionmanager/actionmanager.h"
#include "coreconstants.h"
#include "coreplugintr.h"
#include "icore.h"
#include "locator/locatormanager.h"
@@ -31,16 +32,15 @@ size_t qHash(const QPointer<QAction> &p, size_t seed)
}
QT_END_NAMESPACE
using namespace Core::Internal;
using namespace Core;
namespace Core::Internal {
ActionsFilter::ActionsFilter()
{
setId("Actions from the menu");
setDisplayName(tr("Global Actions & Actions from the Menu"));
setDescription(
tr("Triggers an action. If it is from the menu it matches any part of a menu hierarchy, "
"separated by \">\". For example \"sess def\" matches \"File > Sessions > Default\"."));
setDisplayName(Tr::tr("Global Actions & Actions from the Menu"));
setDescription(Tr::tr("Triggers an action. If it is from the menu it matches any part "
"of a menu hierarchy, separated by \">\". For example \"sess def\" "
"matches \"File > Sessions > Default\"."));
setDefaultShortcutString("t");
setDefaultSearchText({});
setDefaultKeySequence(QKeySequence("Ctrl+Shift+K"));
@@ -341,3 +341,5 @@ void ActionsFilter::restoreState(const QJsonObject &object)
m_lastTriggered.append({nullptr, Utils::Id::fromString(command.toString())});
}
}
} // Core::Internal

View File

@@ -4,6 +4,7 @@
#include "basefilewizard.h"
#include "basefilewizardfactory.h"
#include "coreplugintr.h"
#include "ifilewizardextension.h"
#include <QMessageBox>
@@ -67,7 +68,7 @@ void BaseFileWizard::accept()
reject();
return;
case BaseFileWizardFactory::OverwriteError:
QMessageBox::critical(nullptr, tr("Existing files"), errorMessage);
QMessageBox::critical(nullptr, Tr::tr("Existing files"), errorMessage);
reject();
return;
case BaseFileWizardFactory::OverwriteOk:
@@ -82,7 +83,7 @@ void BaseFileWizard::accept()
// Write
if (!m_factory->writeFiles(m_files, &errorMessage)) {
QMessageBox::critical(parentWidget(), tr("File Generation Failure"), errorMessage);
QMessageBox::critical(parentWidget(), Tr::tr("File Generation Failure"), errorMessage);
reject();
return;
}
@@ -93,7 +94,7 @@ void BaseFileWizard::accept()
bool remove;
if (!ex->processFiles(m_files, &remove, &errorMessage)) {
if (!errorMessage.isEmpty())
QMessageBox::critical(parentWidget(), tr("File Generation Failure"), errorMessage);
QMessageBox::critical(parentWidget(), Tr::tr("File Generation Failure"), errorMessage);
reject();
return;
}
@@ -110,7 +111,7 @@ void BaseFileWizard::accept()
// Post generation handler
if (!m_factory->postGenerateFiles(this, m_files, &errorMessage))
if (!errorMessage.isEmpty())
QMessageBox::critical(nullptr, tr("File Generation Failure"), errorMessage);
QMessageBox::critical(nullptr, Tr::tr("File Generation Failure"), errorMessage);
Wizard::accept();
}
@@ -126,7 +127,7 @@ void BaseFileWizard::generateFileList()
QString errorMessage;
m_files = m_factory->generateFiles(this, &errorMessage);
if (m_files.empty()) {
QMessageBox::critical(parentWidget(), tr("File Generation Failure"), errorMessage);
QMessageBox::critical(parentWidget(), Tr::tr("File Generation Failure"), errorMessage);
reject();
}
}

View File

@@ -4,11 +4,9 @@
#include "basefilewizardfactory.h"
#include "basefilewizard.h"
#include "coreplugintr.h"
#include "dialogs/promptoverwritedialog.h"
#include "editormanager/editormanager.h"
#include "icontext.h"
#include "icore.h"
#include "ifilewizardextension.h"
#include <extensionsystem/pluginmanager.h>
@@ -169,7 +167,7 @@ bool BaseFileWizardFactory::postGenerateOpenEditors(const GeneratedFiles &l, QSt
if (file.attributes() & GeneratedFile::OpenEditorAttribute) {
if (!EditorManager::openEditor(file.filePath(), file.editorId())) {
if (errorMessage)
*errorMessage = tr("Failed to open an editor for \"%1\".").
*errorMessage = Tr::tr("Failed to open an editor for \"%1\".").
arg(file.filePath().toUserOutput());
return false;
}
@@ -194,9 +192,9 @@ BaseFileWizardFactory::OverwriteResult BaseFileWizardFactory::promptOverwrite(Ge
FilePaths existingFiles;
bool oddStuffFound = false;
static const QString readOnlyMsg = tr("[read only]");
static const QString directoryMsg = tr("[folder]");
static const QString symLinkMsg = tr("[symbolic link]");
static const QString readOnlyMsg = Tr::tr("[read only]");
static const QString directoryMsg = Tr::tr("[folder]");
static const QString symLinkMsg = Tr::tr("[symbolic link]");
for (const GeneratedFile &file : std::as_const(*files)) {
const FilePath path = file.filePath();
@@ -236,7 +234,7 @@ BaseFileWizardFactory::OverwriteResult BaseFileWizardFactory::promptOverwrite(Ge
}
if (oddStuffFound) {
*errorMessage = tr("The project directory %1 contains files which cannot be overwritten:\n%2.")
*errorMessage = Tr::tr("The project directory %1 contains files which cannot be overwritten:\n%2.")
.arg(commonExistingPath.toUserOutput(), fileNamesMsgPart);
return OverwriteError;
}

View File

@@ -209,7 +209,7 @@ const char SETTINGS_THEME[] = "Core/CreatorTheme";
const char DEFAULT_THEME[] = "flat";
const char DEFAULT_DARK_THEME[] = "flat-dark";
const char TR_CLEAR_MENU[] = QT_TRANSLATE_NOOP("Core", "Clear Menu");
const char TR_CLEAR_MENU[] = QT_TRANSLATE_NOOP("::Core", "Clear Menu");
const int MODEBAR_ICON_SIZE = 34;
const int MODEBAR_ICONSONLY_BUTTON_SIZE = MODEBAR_ICON_SIZE + 4;

View File

@@ -138,7 +138,7 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
}
if (ThemeEntry::availableThemes().isEmpty()) {
*errorMessage = tr("No themes found in installation.");
*errorMessage = Tr::tr("No themes found in installation.");
return false;
}
const CoreArguments args = parseArguments(arguments);
@@ -170,55 +170,55 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_locator->initialize();
MacroExpander *expander = Utils::globalMacroExpander();
expander->registerVariable("CurrentDate:ISO", tr("The current date (ISO)."),
expander->registerVariable("CurrentDate:ISO", Tr::tr("The current date (ISO)."),
[] { return QDate::currentDate().toString(Qt::ISODate); });
expander->registerVariable("CurrentTime:ISO", tr("The current time (ISO)."),
expander->registerVariable("CurrentTime:ISO", Tr::tr("The current time (ISO)."),
[] { return QTime::currentTime().toString(Qt::ISODate); });
expander->registerVariable("CurrentDate:RFC", tr("The current date (RFC2822)."),
expander->registerVariable("CurrentDate:RFC", Tr::tr("The current date (RFC2822)."),
[] { return QDate::currentDate().toString(Qt::RFC2822Date); });
expander->registerVariable("CurrentTime:RFC", tr("The current time (RFC2822)."),
expander->registerVariable("CurrentTime:RFC", Tr::tr("The current time (RFC2822)."),
[] { return QTime::currentTime().toString(Qt::RFC2822Date); });
expander->registerVariable("CurrentDate:Locale", tr("The current date (Locale)."),
expander->registerVariable("CurrentDate:Locale", Tr::tr("The current date (Locale)."),
[] { return QLocale::system()
.toString(QDate::currentDate(), QLocale::ShortFormat); });
expander->registerVariable("CurrentTime:Locale", tr("The current time (Locale)."),
expander->registerVariable("CurrentTime:Locale", Tr::tr("The current time (Locale)."),
[] { return QLocale::system()
.toString(QTime::currentTime(), QLocale::ShortFormat); });
expander->registerVariable("Config:DefaultProjectDirectory", tr("The configured default directory for projects."),
expander->registerVariable("Config:DefaultProjectDirectory", Tr::tr("The configured default directory for projects."),
[] { return DocumentManager::projectsDirectory().toString(); });
expander->registerVariable("Config:LastFileDialogDirectory", tr("The directory last visited in a file dialog."),
expander->registerVariable("Config:LastFileDialogDirectory", Tr::tr("The directory last visited in a file dialog."),
[] { return DocumentManager::fileDialogLastVisitedDirectory().toString(); });
expander->registerVariable("HostOs:isWindows",
tr("Is %1 running on Windows?").arg(Constants::IDE_DISPLAY_NAME),
Tr::tr("Is %1 running on Windows?").arg(Constants::IDE_DISPLAY_NAME),
[] { return QVariant(Utils::HostOsInfo::isWindowsHost()).toString(); });
expander->registerVariable("HostOs:isOSX",
tr("Is %1 running on OS X?").arg(Constants::IDE_DISPLAY_NAME),
Tr::tr("Is %1 running on OS X?").arg(Constants::IDE_DISPLAY_NAME),
[] { return QVariant(Utils::HostOsInfo::isMacHost()).toString(); });
expander->registerVariable("HostOs:isLinux",
tr("Is %1 running on Linux?").arg(Constants::IDE_DISPLAY_NAME),
Tr::tr("Is %1 running on Linux?").arg(Constants::IDE_DISPLAY_NAME),
[] { return QVariant(Utils::HostOsInfo::isLinuxHost()).toString(); });
expander->registerVariable("HostOs:isUnix",
tr("Is %1 running on any unix-based platform?")
Tr::tr("Is %1 running on any unix-based platform?")
.arg(Constants::IDE_DISPLAY_NAME),
[] { return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString(); });
expander->registerVariable("HostOs:PathListSeparator",
tr("The path list separator for the platform."),
Tr::tr("The path list separator for the platform."),
[] { return QString(Utils::HostOsInfo::pathListSeparator()); });
expander->registerVariable("HostOs:ExecutableSuffix",
tr("The platform executable suffix."),
Tr::tr("The platform executable suffix."),
[] { return QString(Utils::HostOsInfo::withExecutableSuffix("")); });
expander->registerVariable("IDE:ResourcePath",
tr("The directory where %1 finds its pre-installed resources.")
Tr::tr("The directory where %1 finds its pre-installed resources.")
.arg(Constants::IDE_DISPLAY_NAME),
[] { return ICore::resourcePath().toString(); });
expander->registerPrefix("CurrentDate:", tr("The current date (QDate formatstring)."),
expander->registerPrefix("CurrentDate:", Tr::tr("The current date (QDate formatstring)."),
[](const QString &fmt) { return QDate::currentDate().toString(fmt); });
expander->registerPrefix("CurrentTime:", tr("The current time (QTime formatstring)."),
expander->registerPrefix("CurrentTime:", Tr::tr("The current time (QTime formatstring)."),
[](const QString &fmt) { return QTime::currentTime().toString(fmt); });
expander->registerVariable("UUID", tr("Generate a new UUID."),
expander->registerVariable("UUID", Tr::tr("Generate a new UUID."),
[] { return QUuid::createUuid().toString(); });
expander->registerPrefix("#:", tr("A comment."), [](const QString &) { return QString(); });
expander->registerPrefix("#:", Tr::tr("A comment."), [](const QString &) { return QString(); });
Utils::PathChooser::setAboutToShowContextMenuHandler(&CorePlugin::addToPathChooserContextMenu);
@@ -364,7 +364,7 @@ void CorePlugin::addToPathChooserContextMenu(Utils::PathChooser *pathChooser, QM
menu->insertAction(firstAction, showInTerminal);
} else {
auto *mkPathAct = new QAction(tr("Create Folder"), menu);
auto *mkPathAct = new QAction(Tr::tr("Create Folder"), menu);
connect(mkPathAct, &QAction::triggered, pathChooser, [pathChooser] {
QDir().mkpath(pathChooser->filePath().toString());
pathChooser->triggerChanged();
@@ -381,7 +381,7 @@ void CorePlugin::checkSettings()
const auto showMsgBox = [this](const QString &msg, QMessageBox::Icon icon) {
connect(ICore::instance(), &ICore::coreOpened, this, [msg, icon] {
QMessageBox msgBox(ICore::dialogParent());
msgBox.setWindowTitle(tr("Settings File Error"));
msgBox.setWindowTitle(Tr::tr("Settings File Error"));
msgBox.setText(msg);
msgBox.setIcon(icon);
msgBox.exec();
@@ -393,7 +393,7 @@ void CorePlugin::checkSettings()
case QSettings::NoError: {
const QFileInfo fi(userSettings->fileName());
if (fi.exists() && !fi.isWritable()) {
const QString errorMsg = tr("The settings file \"%1\" is not writable.\n"
const QString errorMsg = Tr::tr("The settings file \"%1\" is not writable.\n"
"You will not be able to store any %2 settings.")
.arg(QDir::toNativeSeparators(userSettings->fileName()),
QLatin1String(Core::Constants::IDE_DISPLAY_NAME));
@@ -402,13 +402,13 @@ void CorePlugin::checkSettings()
return;
}
case QSettings::AccessError:
errorDetails = tr("The file is not readable.");
errorDetails = Tr::tr("The file is not readable.");
break;
case QSettings::FormatError:
errorDetails = tr("The file is invalid.");
errorDetails = Tr::tr("The file is invalid.");
break;
}
const QString errorMsg = tr("Error reading settings file \"%1\": %2\n"
const QString errorMsg = Tr::tr("Error reading settings file \"%1\": %2\n"
"You will likely experience further problems using this instance of %3.")
.arg(QDir::toNativeSeparators(userSettings->fileName()), errorDetails,
QLatin1String(Core::Constants::IDE_DISPLAY_NAME));
@@ -421,22 +421,22 @@ void CorePlugin::warnAboutCrashReporing()
return;
QString warnStr = ICore::settings()->value("CrashReportingEnabled", false).toBool()
? tr("%1 collects crash reports for the sole purpose of fixing bugs. "
? Tr::tr("%1 collects crash reports for the sole purpose of fixing bugs. "
"To disable this feature go to %2.")
: tr("%1 can collect crash reports for the sole purpose of fixing bugs. "
: Tr::tr("%1 can collect crash reports for the sole purpose of fixing bugs. "
"To enable this feature go to %2.");
if (Utils::HostOsInfo::isMacHost()) {
warnStr = warnStr.arg(QLatin1String(Core::Constants::IDE_DISPLAY_NAME),
Core::Constants::IDE_DISPLAY_NAME + tr(" > Preferences > Environment > System"));
Core::Constants::IDE_DISPLAY_NAME + Tr::tr(" > Preferences > Environment > System"));
} else {
warnStr = warnStr.arg(QLatin1String(Core::Constants::IDE_DISPLAY_NAME),
tr("Edit > Preferences > Environment > System"));
Tr::tr("Edit > Preferences > Environment > System"));
}
Utils::InfoBarEntry info(kWarnCrashReportingSetting, warnStr,
Utils::InfoBarEntry::GlobalSuppression::Enabled);
info.addCustomButton(tr("Configure..."), [] {
info.addCustomButton(Tr::tr("Configure..."), [] {
ICore::infoBar()->removeInfo(kWarnCrashReportingSetting);
ICore::infoBar()->globallySuppressInfo(kWarnCrashReportingSetting);
ICore::showOptionsDialog(Core::Constants::SETTINGS_ID_SYSTEM);
@@ -456,15 +456,15 @@ void CorePlugin::warnAboutCrashReporing()
// static
QString CorePlugin::msgCrashpadInformation()
{
return tr("%1 uses Google Crashpad for collecting crashes and sending them to our backend "
return Tr::tr("%1 uses Google Crashpad for collecting crashes and sending them to our backend "
"for processing. Crashpad may capture arbitrary contents from crashed process "
"memory, including user sensitive information, URLs, and whatever other content "
"users have trusted %1 with. The collected crash reports are however only used "
"for the sole purpose of fixing bugs.").arg(Core::Constants::IDE_DISPLAY_NAME)
+ "<br><br>" + tr("More information:")
+ "<br><br>" + Tr::tr("More information:")
+ "<br><a href='https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/"
"overview_design.md'>" + tr("Crashpad Overview") + "</a>"
"<br><a href='https://sentry.io/security/'>" + tr("%1 security policy").arg("Sentry.io")
"overview_design.md'>" + Tr::tr("Crashpad Overview") + "</a>"
"<br><a href='https://sentry.io/security/'>" + Tr::tr("%1 security policy").arg("Sentry.io")
+ "</a>";
}

View File

@@ -3,13 +3,14 @@
#include "designmode.h"
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include "coreconstants.h"
#include "coreicons.h"
#include "coreplugintr.h"
#include "editormanager/editormanager.h"
#include "editormanager/ieditor.h"
#include "icore.h"
#include "idocument.h"
#include "modemanager.h"
#include <extensionsystem/pluginmanager.h>
@@ -65,7 +66,7 @@ DesignMode::DesignMode()
setEnabled(false);
setContext(Context(Constants::C_DESIGN_MODE));
setWidget(d->m_stackWidget);
setDisplayName(tr("Design"));
setDisplayName(Tr::tr("Design"));
setIcon(Utils::Icon::modeIcon(Icons::MODE_DESIGN_CLASSIC,
Icons::MODE_DESIGN_FLAT, Icons::MODE_DESIGN_FLAT_ACTIVE));
setPriority(Constants::P_MODE_DESIGN);

View File

@@ -3,6 +3,8 @@
#include "addtovcsdialog.h"
#include "../coreplugintr.h"
#include <utils/layoutbuilder.h>
#include <QDialogButtonBox>
@@ -44,8 +46,8 @@ AddToVcsDialog::AddToVcsDialog(QWidget *parent,
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
const QString addTo = files.size() == 1
? tr("Add the file to version control (%1)").arg(vcsDisplayName)
: tr("Add the files to version control (%1)").arg(vcsDisplayName);
? Tr::tr("Add the file to version control (%1)").arg(vcsDisplayName)
: Tr::tr("Add the files to version control (%1)").arg(vcsDisplayName);
// clang-format off
Column {

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "codecselector.h"
#include <coreplugin/textdocument.h>
#include "../coreplugintr.h"
#include "../textdocument.h"
#include <utils/algorithm.h>
#include <utils/filepath.h>
@@ -38,12 +40,12 @@ CodecSelector::CodecSelector(QWidget *parent, Core::BaseTextDocument *doc)
if (m_hasDecodingError)
buf = doc->decodingErrorSample();
setWindowTitle(tr("Text Encoding"));
setWindowTitle(Tr::tr("Text Encoding"));
m_label = new QLabel(this);
QString decodingErrorHint;
if (m_hasDecodingError)
decodingErrorHint = QLatin1Char('\n') + tr("The following encodings are likely to fit:");
m_label->setText(tr("Select encoding for \"%1\".%2")
decodingErrorHint = '\n' + Tr::tr("The following encodings are likely to fit:");
m_label->setText(Tr::tr("Select encoding for \"%1\".%2")
.arg(doc->filePath().fileName())
.arg(decodingErrorHint));
@@ -92,8 +94,8 @@ CodecSelector::CodecSelector(QWidget *parent, Core::BaseTextDocument *doc)
connect(m_listWidget, &QListWidget::itemSelectionChanged, this, &CodecSelector::updateButtons);
m_dialogButtonBox = new QDialogButtonBox(this);
m_reloadButton = m_dialogButtonBox->addButton(tr("Reload with Encoding"), QDialogButtonBox::DestructiveRole);
m_saveButton = m_dialogButtonBox->addButton(tr("Save with Encoding"), QDialogButtonBox::DestructiveRole);
m_reloadButton = m_dialogButtonBox->addButton(Tr::tr("Reload with Encoding"), QDialogButtonBox::DestructiveRole);
m_saveButton = m_dialogButtonBox->addButton(Tr::tr("Save with Encoding"), QDialogButtonBox::DestructiveRole);
m_dialogButtonBox->addButton(QDialogButtonBox::Cancel);
connect(m_dialogButtonBox, &QDialogButtonBox::clicked, this, &CodecSelector::buttonClicked);
connect(m_listWidget, &QAbstractItemView::activated, m_reloadButton, &QAbstractButton::click);

View File

@@ -4,6 +4,11 @@
#include "externaltoolconfig.h"
#include "ioptionspage.h"
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include "../externaltool.h"
#include "../externaltoolmanager.h"
#include "../icore.h"
#include <utils/algorithm.h>
#include <utils/environment.h>
@@ -17,11 +22,6 @@
#include <utils/qtcprocess.h>
#include <utils/variablechooser.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/externaltool.h>
#include <coreplugin/externaltoolmanager.h>
#include <coreplugin/icore.h>
#include <QCheckBox>
#include <QComboBox>
#include <QCoreApplication>
@@ -49,8 +49,6 @@ const Qt::ItemFlags TOOL_ITEM_FLAGS = Qt::ItemIsSelectable | Qt::ItemIsEnabled |
class ExternalToolModel final : public QAbstractItemModel
{
Q_DECLARE_TR_FUNCTIONS(Core::ExternalToolConfig)
public:
ExternalToolModel() = default;
~ExternalToolModel() final;
@@ -132,9 +130,9 @@ QVariant ExternalToolModel::data(const QString &category, int role)
switch (role) {
case Qt::DisplayRole:
case Qt::EditRole:
return category.isEmpty() ? tr("Uncategorized") : category;
return category.isEmpty() ? Tr::tr("Uncategorized") : category;
case Qt::ToolTipRole:
return category.isEmpty() ? tr("Tools that will appear directly under the External Tools menu.") : QVariant();
return category.isEmpty() ? Tr::tr("Tools that will appear directly under the External Tools menu.") : QVariant();
default:
break;
}
@@ -333,7 +331,7 @@ void ExternalToolModel::revertTool(const QModelIndex &modelIndex)
QModelIndex ExternalToolModel::addCategory()
{
const QString &categoryBase = tr("New Category");
const QString &categoryBase = Tr::tr("New Category");
QString category = categoryBase;
int count = 0;
while (m_tools.contains(category)) {
@@ -360,10 +358,10 @@ QModelIndex ExternalToolModel::addTool(const QModelIndex &atIndex)
auto tool = new ExternalTool;
tool->setDisplayCategory(category);
tool->setDisplayName(tr("New Tool"));
tool->setDescription(tr("This tool prints a line of useful text"));
tool->setDisplayName(Tr::tr("New Tool"));
tool->setDescription(Tr::tr("This tool prints a line of useful text"));
//: Sample external tool text
const QString text = tr("Useful text");
const QString text = Tr::tr("Useful text");
if (HostOsInfo::isWindowsHost()) {
tool->setExecutables({"cmd"});
tool->setArguments("/c echo " + text);
@@ -410,15 +408,13 @@ void ExternalToolModel::removeTool(const QModelIndex &modelIndex)
static void fillBaseEnvironmentComboBox(QComboBox *box)
{
box->clear();
box->addItem(ExternalTool::tr("System Environment"), QByteArray());
box->addItem(Tr::tr("System Environment"), QByteArray());
for (const EnvironmentProvider &provider : EnvironmentProvider::providers())
box->addItem(provider.displayName, Id::fromName(provider.id).toSetting());
}
class ExternalToolConfig final : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Core::ExternalToolConfig)
public:
ExternalToolConfig();
@@ -468,14 +464,14 @@ ExternalToolConfig::ExternalToolConfig()
m_toolTree->header()->setVisible(false);
m_toolTree->header()->setDefaultSectionSize(21);
auto addButton = new QPushButton(tr("Add"));
addButton->setToolTip(tr("Add tool."));
auto addButton = new QPushButton(Tr::tr("Add"));
addButton->setToolTip(Tr::tr("Add tool."));
m_removeButton = new QPushButton(tr("Remove"));
m_removeButton->setToolTip(tr("Remove tool."));
m_removeButton = new QPushButton(Tr::tr("Remove"));
m_removeButton->setToolTip(Tr::tr("Remove tool."));
m_revertButton = new QPushButton(tr("Reset"));
m_revertButton->setToolTip(tr("Revert tool to default."));
m_revertButton = new QPushButton(Tr::tr("Reset"));
m_revertButton->setToolTip(Tr::tr("Revert tool to default."));
auto scrollArea = new QScrollArea(this);
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -504,20 +500,20 @@ ExternalToolConfig::ExternalToolConfig()
m_workingDirectory = new PathChooser(m_infoWidget);
auto outputLabel = new QLabel(tr("Output:"));
outputLabel->setToolTip(tr("<html><head/><body>\n"
auto outputLabel = new QLabel(Tr::tr("Output:"));
outputLabel->setToolTip(Tr::tr("<html><head/><body>\n"
"<p>What to do with the executable's standard output.\n"
"<ul><li>Ignore: Do nothing with it.</li><li>Show in General Messages.</li>"
"<li>Replace selection: Replace the current selection in the current document with it.</li>"
"</ul></p></body></html>\n"));
m_outputBehavior = new QComboBox(m_infoWidget);
m_outputBehavior->addItem(tr("Ignore"));
m_outputBehavior->addItem(tr("Show in General Messages"));
m_outputBehavior->addItem(tr("Replace Selection"));
m_outputBehavior->addItem(Tr::tr("Ignore"));
m_outputBehavior->addItem(Tr::tr("Show in General Messages"));
m_outputBehavior->addItem(Tr::tr("Replace Selection"));
auto errorOutputLabel = new QLabel(tr("Error output:"));
errorOutputLabel->setToolTip(tr("<html><head><body>\n"
auto errorOutputLabel = new QLabel(Tr::tr("Error output:"));
errorOutputLabel->setToolTip(Tr::tr("<html><head><body>\n"
"<p >What to do with the executable's standard error output.</p>\n"
"<ul><li>Ignore: Do nothing with it.</li>\n"
"<li>Show in General Messages.</li>\n"
@@ -525,23 +521,23 @@ ExternalToolConfig::ExternalToolConfig()
"</ul></body></html>"));
m_errorOutputBehavior = new QComboBox(m_infoWidget);
m_errorOutputBehavior->addItem(tr("Ignore"));
m_errorOutputBehavior->addItem(tr("Show in General Messages"));
m_errorOutputBehavior->addItem(tr("Replace Selection"));
m_errorOutputBehavior->addItem(Tr::tr("Ignore"));
m_errorOutputBehavior->addItem(Tr::tr("Show in General Messages"));
m_errorOutputBehavior->addItem(Tr::tr("Replace Selection"));
m_environmentLabel = new QLabel(tr("No changes to apply."));
m_environmentLabel = new QLabel(Tr::tr("No changes to apply."));
m_environmentLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
auto environmentButton = new QPushButton(tr("Change..."));
auto environmentButton = new QPushButton(Tr::tr("Change..."));
m_modifiesDocumentCheckbox = new QCheckBox(tr("Modifies current document"));
m_modifiesDocumentCheckbox->setToolTip(tr("If the tool modifies the current document, "
m_modifiesDocumentCheckbox = new QCheckBox(Tr::tr("Modifies current document"));
m_modifiesDocumentCheckbox->setToolTip(Tr::tr("If the tool modifies the current document, "
"set this flag to ensure that the document is saved before "
"running the tool and is reloaded after the tool finished."));
auto inputLabel = new QLabel(tr("Input:"));
inputLabel->setToolTip(tr("Text to pass to the executable via standard input. Leave "
"empty if the executable should not receive any input."));
auto inputLabel = new QLabel(Tr::tr("Input:"));
inputLabel->setToolTip(Tr::tr("Text to pass to the executable via standard input. Leave "
"empty if the executable should not receive any input."));
m_inputText = new QPlainTextEdit(m_infoWidget);
QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -558,14 +554,14 @@ ExternalToolConfig::ExternalToolConfig()
using namespace Layouting;
Form {
tr("Description:"), m_description, br,
tr("Executable:"), m_executable, br,
tr("Arguments:"), m_arguments, br,
tr("Working directory:"), m_workingDirectory, br,
Tr::tr("Description:"), m_description, br,
Tr::tr("Executable:"), m_executable, br,
Tr::tr("Arguments:"), m_arguments, br,
Tr::tr("Working directory:"), m_workingDirectory, br,
outputLabel, m_outputBehavior, br,
errorOutputLabel, m_errorOutputBehavior, br,
tr("Base environment:"), m_baseEnvironment, br,
tr("Environment:"), m_environmentLabel, environmentButton, br,
Tr::tr("Base environment:"), m_baseEnvironment, br,
Tr::tr("Environment:"), m_environmentLabel, environmentButton, br,
empty, m_modifiesDocumentCheckbox, br,
inputLabel, m_inputText
}.attachTo(m_infoWidget, WithMargins);
@@ -631,10 +627,10 @@ ExternalToolConfig::ExternalToolConfig()
auto menu = new QMenu(addButton);
addButton->setMenu(menu);
auto addTool = new QAction(tr("Add Tool"), this);
auto addTool = new QAction(Tr::tr("Add Tool"), this);
menu->addAction(addTool);
connect(addTool, &QAction::triggered, this, &ExternalToolConfig::addTool);
auto addCategory = new QAction(tr("Add Category"), this);
auto addCategory = new QAction(Tr::tr("Add Category"), this);
menu->addAction(addCategory);
connect(addCategory, &QAction::triggered, this, &ExternalToolConfig::addCategory);
@@ -926,8 +922,8 @@ void ExternalToolConfig::updateEffectiveArguments()
void ExternalToolConfig::editEnvironmentChanges()
{
const QString placeholderText = HostOsInfo::isWindowsHost()
? tr("PATH=C:\\dev\\bin;${PATH}")
: tr("PATH=/opt/bin:${PATH}");
? Tr::tr("PATH=C:\\dev\\bin;${PATH}")
: Tr::tr("PATH=/opt/bin:${PATH}");
const auto newItems = EnvironmentDialog::getEnvironmentItems(m_environmentLabel,
m_environment,
placeholderText);
@@ -942,7 +938,7 @@ void ExternalToolConfig::updateEnvironmentLabel()
QString shortSummary = EnvironmentItem::toStringList(m_environment).join("; ");
QFontMetrics fm(m_environmentLabel->font());
shortSummary = fm.elidedText(shortSummary, Qt::ElideRight, m_environmentLabel->width());
m_environmentLabel->setText(shortSummary.isEmpty() ? tr("No changes to apply.") : shortSummary);
m_environmentLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.") : shortSummary);
}
// ToolSettingsPage
@@ -950,7 +946,7 @@ void ExternalToolConfig::updateEnvironmentLabel()
ToolSettings::ToolSettings()
{
setId(Constants::SETTINGS_ID_TOOLS);
setDisplayName(ExternalToolConfig::tr("External Tools"));
setDisplayName(Tr::tr("External Tools"));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
setWidgetCreator([] { return new ExternalToolConfig; });
}

View File

@@ -3,8 +3,10 @@
#include "filepropertiesdialog.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include "../coreplugintr.h"
#include "../editormanager/editormanager.h"
#include "../editormanager/ieditorfactory.h"
#include <utils/fileutils.h>
#include <utils/layoutbuilder.h>
#include <utils/mimeutils.h>
@@ -64,21 +66,21 @@ FilePropertiesDialog::FilePropertiesDialog(const FilePath &filePath, QWidget *pa
// clang-format off
Column {
Form {
tr("Name:"), m_name, br,
tr("Path:"), m_path, br,
tr("MIME type:"), m_mimeType, br,
tr("Default editor:"), m_defaultEditor, br,
tr("Line endings:"), m_lineEndings, br,
tr("Indentation:"), m_indentation, br,
tr("Owner:"), m_owner, br,
tr("Group:"), m_group, br,
tr("Size:"), m_size, br,
tr("Last read:"), m_lastRead, br,
tr("Last modified:"), m_lastModified, br,
tr("Readable:"), m_readable, br,
tr("Writable:"), m_writable, br,
tr("Executable:"), m_executable, br,
tr("Symbolic link:"), m_symLink, br
Tr::tr("Name:"), m_name, br,
Tr::tr("Path:"), m_path, br,
Tr::tr("MIME type:"), m_mimeType, br,
Tr::tr("Default editor:"), m_defaultEditor, br,
Tr::tr("Line endings:"), m_lineEndings, br,
Tr::tr("Indentation:"), m_indentation, br,
Tr::tr("Owner:"), m_owner, br,
Tr::tr("Group:"), m_group, br,
Tr::tr("Size:"), m_size, br,
Tr::tr("Last read:"), m_lastRead, br,
Tr::tr("Last modified:"), m_lastModified, br,
Tr::tr("Readable:"), m_readable, br,
Tr::tr("Writable:"), m_writable, br,
Tr::tr("Executable:"), m_executable, br,
Tr::tr("Symbolic link:"), m_symLink, br
},
buttonBox
}.attachTo(this);
@@ -105,8 +107,8 @@ void FilePropertiesDialog::detectTextFileSettings()
{
QFile file(m_filePath.toString());
if (!file.open(QIODevice::ReadOnly)) {
m_lineEndings->setText(tr("Unknown"));
m_indentation->setText(tr("Unknown"));
m_lineEndings->setText(Tr::tr("Unknown"));
m_indentation->setText(Tr::tr("Unknown"));
return;
}
@@ -116,15 +118,15 @@ void FilePropertiesDialog::detectTextFileSettings()
// Try to guess the files line endings
if (data.contains("\r\n")) {
m_lineEndings->setText(tr("Windows (CRLF)"));
m_lineEndings->setText(Tr::tr("Windows (CRLF)"));
} else if (data.contains("\n")) {
m_lineEndings->setText(tr("Unix (LF)"));
m_lineEndings->setText(Tr::tr("Unix (LF)"));
} else if (data.contains("\r")) {
m_lineEndings->setText(tr("Mac (CR)"));
m_lineEndings->setText(Tr::tr("Mac (CR)"));
lineSeparator = '\r';
} else {
// That does not look like a text file at all
m_lineEndings->setText(tr("Unknown"));
m_lineEndings->setText(Tr::tr("Unknown"));
return;
}
@@ -167,14 +169,14 @@ void FilePropertiesDialog::detectTextFileSettings()
if (!indents.empty()) {
if (tabIndented) {
m_indentation->setText(tr("Mixed"));
m_indentation->setText(Tr::tr("Mixed"));
} else {
m_indentation->setText(tr("%1 Spaces").arg(max->first));
m_indentation->setText(Tr::tr("%1 Spaces").arg(max->first));
}
} else if (tabIndented) {
m_indentation->setText(tr("Tabs"));
m_indentation->setText(Tr::tr("Tabs"));
} else {
m_indentation->setText(tr("Unknown"));
m_indentation->setText(Tr::tr("Unknown"));
}
}
@@ -192,7 +194,7 @@ void FilePropertiesDialog::refresh()
const EditorTypeList factories = IEditorFactory::preferredEditorTypes(m_filePath);
m_defaultEditor->setText(!factories.isEmpty() ? factories.at(0)->displayName()
: tr("Undefined"));
: Tr::tr("Undefined"));
m_owner->setText(fileInfo.owner());
m_group->setText(fileInfo.group());
@@ -206,8 +208,8 @@ void FilePropertiesDialog::refresh()
if (mimeType.inherits("text/plain")) {
detectTextFileSettings();
} else {
m_lineEndings->setText(tr("Unknown"));
m_indentation->setText(tr("Unknown"));
m_lineEndings->setText(Tr::tr("Unknown"));
m_indentation->setText(Tr::tr("Unknown"));
}
});
}

View File

@@ -3,8 +3,9 @@
#include "newdialogwidget.h"
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include "../coreplugintr.h"
#include "../icontext.h"
#include "../icore.h"
#include <utils/algorithm.h>
#include <utils/layoutbuilder.h>
@@ -32,7 +33,7 @@ Q_DECLARE_METATYPE(Core::IWizardFactory*)
using namespace Utils;
namespace {
namespace Core::Internal {
const int ICON_SIZE = 48;
const char LAST_CATEGORY_KEY[] = "Core/NewDialog/LastCategory";
@@ -42,9 +43,6 @@ const char SHOW_PLATOFORM_FILTER[] = "Core/NewDialog/ShowPlatformFilter";
const char BLACKLISTED_CATEGORIES_KEY[] = "Core/NewDialog/BlacklistedCategories";
const char ALTERNATIVE_WIZARD_STYLE[] = "Core/NewDialog/AlternativeWizardStyle";
using namespace Core;
using namespace Core::Internal;
class WizardFactoryContainer
{
public:
@@ -150,13 +148,11 @@ public:
}
};
}
} // Core::Internal
Q_DECLARE_METATYPE(WizardFactoryContainer)
Q_DECLARE_METATYPE(Core::Internal::WizardFactoryContainer)
using namespace Core;
using namespace Core::Internal;
using namespace Layouting;
namespace Core::Internal {
NewDialogWidget::NewDialogWidget(QWidget *parent)
: QDialog(parent)
@@ -197,11 +193,12 @@ NewDialogWidget::NewDialogWidget(QWidget *parent)
m_templateDescription->setFocusPolicy(Qt::NoFocus);
m_templateDescription->setFrameShape(QFrame::NoFrame);
using namespace Layouting;
Column { m_imageLabel, m_templateDescription }.attachTo(frame);
Column {
Row { QCoreApplication::translate("Core::Internal::NewDialog", "Choose a template:"),
st, m_comboBox },
Row { Tr::tr("Choose a template:"), st, m_comboBox },
Row { m_templateCategoryView, m_templatesView, frame },
buttonBox
}.attachTo(this);
@@ -211,7 +208,7 @@ NewDialogWidget::NewDialogWidget(QWidget *parent)
frame->setPalette(p);
m_okButton = buttonBox->button(QDialogButtonBox::Ok);
m_okButton->setDefault(true);
m_okButton->setText(tr("Choose..."));
m_okButton->setText(Tr::tr("Choose..."));
m_model = new QStandardItemModel(this);
@@ -279,10 +276,10 @@ void NewDialogWidget::setWizardFactories(QList<IWizardFactory *> factories,
m_model->clear();
QStandardItem *parentItem = m_model->invisibleRootItem();
QStandardItem *projectKindItem = new QStandardItem(tr("Projects"));
QStandardItem *projectKindItem = new QStandardItem(Tr::tr("Projects"));
projectKindItem->setData(IWizardFactory::ProjectWizard, Qt::UserRole);
projectKindItem->setFlags({}); // disable item to prevent focus
QStandardItem *filesKindItem = new QStandardItem(tr("Files and Classes"));
QStandardItem *filesKindItem = new QStandardItem(Tr::tr("Files and Classes"));
filesKindItem->setData(IWizardFactory::FileWizard, Qt::UserRole);
filesKindItem->setFlags({}); // disable item to prevent focus
@@ -293,11 +290,11 @@ void NewDialogWidget::setWizardFactories(QList<IWizardFactory *> factories,
const bool allowAllTemplates = ICore::settings()->value(ALLOW_ALL_TEMPLATES, true).toBool();
if (allowAllTemplates)
m_comboBox->addItem(tr("All Templates"), Id().toSetting());
m_comboBox->addItem(Tr::tr("All Templates"), Id().toSetting());
for (Id platform : availablePlatforms) {
const QString displayNameForPlatform = IWizardFactory::displayNameForPlatform(platform);
m_comboBox->addItem(tr("%1 Templates").arg(displayNameForPlatform), platform.toSetting());
m_comboBox->addItem(Tr::tr("%1 Templates").arg(displayNameForPlatform), platform.toSetting());
}
m_comboBox->setCurrentIndex(0); // "All templates"
@@ -443,9 +440,9 @@ void NewDialogWidget::currentItemChanged(const QModelIndex &index)
desciption.replace(QLatin1Char('\n'), QLatin1String("<br>"));
desciption += QLatin1String("<br><br><b>");
if (wizard->flags().testFlag(IWizardFactory::PlatformIndependent))
desciption += tr("Platform independent") + QLatin1String("</b>");
desciption += Tr::tr("Platform independent") + QLatin1String("</b>");
else
desciption += tr("Supported Platforms")
desciption += Tr::tr("Supported Platforms")
+ QLatin1String("</b>: <ul>")
+ "<li>" + displayNamesForSupportedPlatforms.join("</li><li>") + "</li>"
+ QLatin1String("</ul>");
@@ -511,3 +508,5 @@ void NewDialogWidget::setSelectedPlatform(int /*platform*/)
//The static cast allows us to keep PlatformFilterProxyModel anonymous
static_cast<PlatformFilterProxyModel *>(m_filterProxyModel)->setPlatform(selectedPlatform());
}
} // Core::Internal

View File

@@ -25,14 +25,10 @@ class QTextBrowser;
class QTreeView;
QT_END_NAMESPACE
namespace Core {
namespace Internal {
namespace Core::Internal {
class NewDialogWidget : public QDialog, public NewDialog
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::NewDialog)
public:
explicit NewDialogWidget(QWidget *parent);
~NewDialogWidget() override;
@@ -77,5 +73,4 @@ private:
QVariantMap m_extraVariables;
};
} // namespace Internal
} // namespace Core
} // Core::Internal

View File

@@ -3,6 +3,8 @@
#include "openwithdialog.h"
#include "../coreplugintr.h"
#include <utils/filepath.h>
#include <utils/layoutbuilder.h>
@@ -10,8 +12,7 @@
#include <QListWidget>
#include <QPushButton>
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
OpenWithDialog::OpenWithDialog(const Utils::FilePath &filePath, QWidget *parent)
: QDialog(parent)
@@ -19,7 +20,7 @@ OpenWithDialog::OpenWithDialog(const Utils::FilePath &filePath, QWidget *parent)
, buttonBox(new QDialogButtonBox)
{
resize(358, 199);
setWindowTitle(tr("Open File With..."));
setWindowTitle(Tr::tr("Open File With..."));
buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
@@ -27,7 +28,7 @@ OpenWithDialog::OpenWithDialog(const Utils::FilePath &filePath, QWidget *parent)
using namespace Utils::Layouting;
// clang-format off
Column {
tr("Open file \"%1\" with:").arg(filePath.fileName()),
Tr::tr("Open file \"%1\" with:").arg(filePath.fileName()),
editorListWidget,
buttonBox
}.attachTo(this);
@@ -70,3 +71,5 @@ void OpenWithDialog::currentItemChanged(QListWidgetItem *current, QListWidgetIte
{
setOkButtonEnabled(current);
}
} // Core::Internal

View File

@@ -3,6 +3,8 @@
#include "promptoverwritedialog.h"
#include "../coreplugintr.h"
#include <utils/fileutils.h>
#include <utils/stringutils.h>
@@ -43,7 +45,7 @@ PromptOverwriteDialog::PromptOverwriteDialog(QWidget *parent) :
m_view(new QTreeView),
m_model(new QStandardItemModel(0, 1, this))
{
setWindowTitle(tr("Overwrite Existing Files"));
setWindowTitle(Tr::tr("Overwrite Existing Files"));
setModal(true);
auto mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(m_label);
@@ -74,8 +76,8 @@ void PromptOverwriteDialog::setFiles(const FilePaths &l)
m_model->appendRow(item);
}
const QString message =
tr("The following files already exist in the folder\n%1.\n"
"Would you like to overwrite them?").arg(nativeCommonPath);
Tr::tr("The following files already exist in the folder\n%1.\n"
"Would you like to overwrite them?").arg(nativeCommonPath);
m_label->setText(message);
}

View File

@@ -3,11 +3,12 @@
#include "readonlyfilesdialog.h"
#include <coreplugin/editormanager/editormanager_p.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/vcsmanager.h>
#include "../coreplugintr.h"
#include "../editormanager/editormanager_p.h"
#include "../icore.h"
#include "../idocument.h"
#include "../iversioncontrol.h"
#include "../vcsmanager.h"
#include <utils/algorithm.h>
#include <utils/fileutils.h>
@@ -35,8 +36,6 @@ namespace Internal {
class ReadOnlyFilesDialogPrivate
{
Q_DECLARE_TR_FUNCTIONS(Core::ReadOnlyFilesDialog)
public:
ReadOnlyFilesDialogPrivate(ReadOnlyFilesDialog *parent, IDocument *document = nullptr, bool useSaveAs = false);
~ReadOnlyFilesDialogPrivate();
@@ -100,10 +99,10 @@ ReadOnlyFilesDialogPrivate::ReadOnlyFilesDialogPrivate(ReadOnlyFilesDialog *pare
, useVCS(false)
, showWarnings(false)
, document(document)
, mixedText(tr("Mixed"))
, makeWritableText(tr("Make Writable"))
, versionControlOpenText(tr("Open with VCS"))
, saveAsText(tr("Save As"))
, mixedText(Tr::tr("Mixed"))
, makeWritableText(Tr::tr("Make Writable"))
, versionControlOpenText(Tr::tr("Open with VCS"))
, saveAsText(Tr::tr("Save As"))
{}
ReadOnlyFilesDialogPrivate::~ReadOnlyFilesDialogPrivate()
@@ -217,16 +216,16 @@ void ReadOnlyFilesDialogPrivate::promptFailWarning(const FilePaths &files, ReadO
case ReadOnlyFilesDialog::RO_OpenVCS: {
if (IVersionControl *vc = versionControls[file]) {
const QString openText = Utils::stripAccelerator(vc->vcsOpenText());
title = tr("Failed to %1 File").arg(openText);
message = tr("%1 file %2 from version control system %3 failed.")
title = Tr::tr("Failed to %1 File").arg(openText);
message = Tr::tr("%1 file %2 from version control system %3 failed.")
.arg(openText)
.arg(file.toUserOutput())
.arg(vc->displayName())
+ '\n'
+ failWarning;
} else {
title = tr("No Version Control System Found");
message = tr("Cannot open file %1 from version control system.\n"
title = Tr::tr("No Version Control System Found");
message = Tr::tr("Cannot open file %1 from version control system.\n"
"No version control system found.")
.arg(file.toUserOutput())
+ '\n'
@@ -235,27 +234,27 @@ void ReadOnlyFilesDialogPrivate::promptFailWarning(const FilePaths &files, ReadO
break;
}
case ReadOnlyFilesDialog::RO_MakeWritable:
title = tr("Cannot Set Permissions");
message = tr("Cannot set permissions for %1 to writable.")
title = Tr::tr("Cannot Set Permissions");
message = Tr::tr("Cannot set permissions for %1 to writable.")
.arg(file.toUserOutput())
+ '\n'
+ failWarning;
break;
case ReadOnlyFilesDialog::RO_SaveAs:
title = tr("Cannot Save File");
message = tr("Cannot save file %1").arg(file.toUserOutput())
title = Tr::tr("Cannot Save File");
message = Tr::tr("Cannot save file %1").arg(file.toUserOutput())
+ '\n'
+ failWarning;
break;
default:
title = tr("Canceled Changing Permissions");
title = Tr::tr("Canceled Changing Permissions");
message = failWarning;
break;
}
} else {
title = tr("Could Not Change Permissions on Some Files");
title = Tr::tr("Could Not Change Permissions on Some Files");
message = failWarning + QLatin1Char('\n')
+ tr("See details for a complete list of files.");
+ Tr::tr("See details for a complete list of files.");
details = Utils::transform(files, &FilePath::toString).join('\n');
}
QMessageBox msgBox(QMessageBox::Warning, title, message,
@@ -393,18 +392,18 @@ void ReadOnlyFilesDialogPrivate::updateSelectAll()
void ReadOnlyFilesDialogPrivate::initDialog(const FilePaths &filePaths)
{
q->resize(639, 217);
q->setWindowTitle(tr("Files Without Write Permissions"));
q->setWindowTitle(Tr::tr("Files Without Write Permissions"));
m_msgLabel = new QLabel(tr(
m_msgLabel = new QLabel(Tr::tr(
"The following files have no write permissions. Do you want to change the permissions?"));
m_treeWidget = new QTreeWidget;
auto headerItem = new QTreeWidgetItem;
headerItem->setText(0, tr("Make Writable"));
headerItem->setText(1, tr("Open with VCS"));
headerItem->setText(2, tr("Save As"));
headerItem->setText(3, tr("Filename"));
headerItem->setText(4, tr("Path"));
headerItem->setText(0, Tr::tr("Make Writable"));
headerItem->setText(1, Tr::tr("Open with VCS"));
headerItem->setText(2, Tr::tr("Save As"));
headerItem->setText(3, Tr::tr("Filename"));
headerItem->setText(4, Tr::tr("Path"));
m_treeWidget->setSelectionMode(QAbstractItemView::NoSelection);
m_treeWidget->setTextElideMode(Qt::ElideLeft);
m_treeWidget->setIndentation(0);
@@ -416,14 +415,14 @@ void ReadOnlyFilesDialogPrivate::initDialog(const FilePaths &filePaths)
m_setAll = new QComboBox;
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::NoButton);
buttonBox->addButton(tr("Change &Permission"), QDialogButtonBox::AcceptRole);
buttonBox->addButton(Tr::tr("Change &Permission"), QDialogButtonBox::AcceptRole);
buttonBox->addButton(QDialogButtonBox::Cancel);
QObject::connect(buttonBox, &QDialogButtonBox::accepted, q, &QDialog::accept);
QObject::connect(buttonBox, &QDialogButtonBox::rejected, q, &QDialog::reject);
using namespace Layouting;
QWidget *setAllWidget = Row{tr("Select all, if possible: "), m_setAll, st}.emerge(
QWidget *setAllWidget = Row{Tr::tr("Select all, if possible: "), m_setAll, st}.emerge(
WithoutMargins);
// clang-format off
@@ -505,9 +504,10 @@ void ReadOnlyFilesDialogPrivate::initDialog(const FilePaths &filePaths)
m_treeWidget->resizeColumnToContents(FileName);
m_treeWidget->resizeColumnToContents(Folder);
setAllWidget->setVisible(false);
if (useVCS)
m_msgLabel->setText(tr("The following files are not checked out yet.\n"
"Do you want to check them out now?"));
if (useVCS) {
m_msgLabel->setText(Tr::tr("The following files are not checked out yet.\n"
"Do you want to check them out now?"));
}
return;
}

View File

@@ -3,7 +3,8 @@
#include "restartdialog.h"
#include <coreplugin/icore.h>
#include "../coreplugintr.h"
#include "../icore.h"
#include <QPushButton>
@@ -12,11 +13,11 @@ namespace Core {
RestartDialog::RestartDialog(QWidget *parent, const QString &text)
: QMessageBox(parent)
{
setWindowTitle(tr("Restart Required"));
setWindowTitle(Tr::tr("Restart Required"));
setText(text);
setIcon(QMessageBox::Information);
addButton(tr("Later"), QMessageBox::NoRole);
addButton(tr("Restart Now"), QMessageBox::YesRole);
addButton(Tr::tr("Later"), QMessageBox::NoRole);
addButton(Tr::tr("Restart Now"), QMessageBox::YesRole);
connect(this, &QDialog::accepted, ICore::instance(), &ICore::restart, Qt::QueuedConnection);
}

View File

@@ -12,8 +12,6 @@ namespace Core {
class CORE_EXPORT RestartDialog : public QMessageBox
{
Q_DECLARE_TR_FUNCTIONS(Core::RestartDialog)
public:
RestartDialog(QWidget *parent, const QString &text);
};

View File

@@ -3,8 +3,9 @@
#include "saveitemsdialog.h"
#include <coreplugin/diffservice.h>
#include <coreplugin/idocument.h>
#include "../coreplugintr.h"
#include "../diffservice.h"
#include "../idocument.h"
#include <utils/filepath.h>
#include <utils/fsengine/fileiconprovider.h>
@@ -24,18 +25,17 @@
Q_DECLARE_METATYPE(Core::IDocument*)
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &items)
: QDialog(parent)
, m_msgLabel(new QLabel(tr("The following files have unsaved changes:")))
, m_msgLabel(new QLabel(Tr::tr("The following files have unsaved changes:")))
, m_treeWidget(new QTreeWidget)
, m_saveBeforeBuildCheckBox(new QCheckBox(tr("Automatically save all files before building")))
, m_saveBeforeBuildCheckBox(new QCheckBox(Tr::tr("Automatically save all files before building")))
, m_buttonBox(new QDialogButtonBox)
{
resize(457, 200);
setWindowTitle(tr("Save Changes"));
setWindowTitle(Tr::tr("Save Changes"));
m_treeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
m_treeWidget->setTextElideMode(Qt::ElideLeft);
@@ -50,11 +50,11 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item
? QDialogButtonBox::ResetRole
: QDialogButtonBox::DestructiveRole;
if (DiffService::instance()) {
m_diffButton = m_buttonBox->addButton(tr("&Diff"), discardButtonRole);
m_diffButton = m_buttonBox->addButton(Tr::tr("&Diff"), discardButtonRole);
connect(m_diffButton, &QAbstractButton::clicked, this, &SaveItemsDialog::collectFilesToDiff);
}
m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save);
QPushButton *discardButton = m_buttonBox->addButton(tr("Do &Not Save"), discardButtonRole);
QPushButton *discardButton = m_buttonBox->addButton(Tr::tr("Do &Not Save"), discardButtonRole);
m_treeWidget->setFocus();
m_saveBeforeBuildCheckBox->setVisible(false);
@@ -116,16 +116,16 @@ void SaveItemsDialog::updateButtons()
int count = m_treeWidget->selectedItems().count();
QPushButton *saveButton = m_buttonBox->button(QDialogButtonBox::Save);
bool buttonsEnabled = true;
QString saveText = tr("&Save");
QString diffText = tr("&Diff && Cancel");
QString saveText = Tr::tr("&Save");
QString diffText = Tr::tr("&Diff && Cancel");
if (count == m_treeWidget->topLevelItemCount()) {
saveText = tr("&Save All");
diffText = tr("&Diff All && Cancel");
saveText = Tr::tr("&Save All");
diffText = Tr::tr("&Diff All && Cancel");
} else if (count == 0) {
buttonsEnabled = false;
} else {
saveText = tr("&Save Selected");
diffText = tr("&Diff Selected && Cancel");
saveText = Tr::tr("&Save Selected");
diffText = Tr::tr("&Diff Selected && Cancel");
}
saveButton->setEnabled(buttonsEnabled);
saveButton->setText(saveText);
@@ -140,9 +140,9 @@ void SaveItemsDialog::adjustButtonWidths()
// give save button a size that all texts fit in, so it doesn't get resized
// Mac: make cancel + save button same size (work around dialog button box issue)
QStringList possibleTexts;
possibleTexts << tr("Save") << tr("Save All");
possibleTexts << Tr::tr("Save") << Tr::tr("Save All");
if (m_treeWidget->topLevelItemCount() > 1)
possibleTexts << tr("Save Selected");
possibleTexts << Tr::tr("Save Selected");
int maxTextWidth = 0;
QPushButton *saveButton = m_buttonBox->button(QDialogButtonBox::Save);
for (const QString &text : std::as_const(possibleTexts)) {
@@ -208,3 +208,5 @@ bool SaveItemsDialog::alwaysSaveChecked()
{
return m_saveBeforeBuildCheckBox->isChecked();
}
} // Core::Internal

View File

@@ -3,9 +3,10 @@
#include "settingsdialog.h"
#include <coreplugin/icore.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/iwizardfactory.h>
#include "ioptionspage.h"
#include "../coreplugintr.h"
#include "../icore.h"
#include "../iwizardfactory.h"
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
@@ -429,7 +430,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
m_filterLineEdit->setFiltering(true);
createGui();
setWindowTitle(QCoreApplication::translate("Core::Internal::SettingsDialog", "Preferences"));
setWindowTitle(Tr::tr("Preferences"));
m_model.setPages(m_pages, IOptionsPageProvider::allOptionsPagesProviders());

View File

@@ -3,12 +3,13 @@
#include "shortcutsettings.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/commandsfile.h>
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include "../documentmanager.h"
#include "../icore.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../actionmanager/commandsfile.h"
#include <utils/algorithm.h>
#include <utils/fancylineedit.h>
@@ -130,11 +131,10 @@ ShortcutButton::ShortcutButton(QWidget *parent)
: QPushButton(parent)
, m_key({{0, 0, 0, 0}})
{
// Using ShortcutButton::tr() as workaround for QTBUG-34128
setToolTip(ShortcutButton::tr("Click and type the new key sequence."));
setToolTip(::Core::Tr::tr("Click and type the new key sequence."));
setCheckable(true);
m_checkedText = ShortcutButton::tr("Stop Recording");
m_uncheckedText = ShortcutButton::tr("Record");
m_checkedText = ::Core::Tr::tr("Stop Recording");
m_uncheckedText = ::Core::Tr::tr("Record");
updateText();
connect(this, &ShortcutButton::toggled, this, &ShortcutButton::handleToggleChange);
}
@@ -228,8 +228,6 @@ void ShortcutButton::handleToggleChange(bool toogleState)
class ShortcutSettingsWidget final : public CommandMappings
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::ShortcutSettings)
public:
ShortcutSettingsWidget();
~ShortcutSettingsWidget() final;
@@ -262,8 +260,8 @@ private:
ShortcutSettingsWidget::ShortcutSettingsWidget()
{
setPageTitle(tr("Keyboard Shortcuts"));
setTargetHeader(tr("Shortcut"));
setPageTitle(Tr::tr("Keyboard Shortcuts"));
setTargetHeader(Tr::tr("Shortcut"));
setResetVisible(true);
connect(ActionManager::instance(), &ActionManager::commandListChanged,
@@ -275,7 +273,7 @@ ShortcutSettingsWidget::ShortcutSettingsWidget()
this,
&ShortcutSettingsWidget::resetToDefault);
m_shortcutBox = new QGroupBox(tr("Shortcut"), this);
m_shortcutBox = new QGroupBox(Tr::tr("Shortcut"), this);
m_shortcutBox->setEnabled(false);
m_shortcutLayout = new QGridLayout(m_shortcutBox);
m_shortcutBox->setLayout(m_shortcutLayout);
@@ -292,7 +290,7 @@ ShortcutSettingsWidget::~ShortcutSettingsWidget()
ShortcutSettings::ShortcutSettings()
{
setId(Constants::SETTINGS_ID_SHORTCUTS);
setDisplayName(ShortcutSettingsWidget::tr("Keyboard"));
setDisplayName(Tr::tr("Keyboard"));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
}
@@ -371,7 +369,7 @@ void ShortcutSettingsWidget::setupShortcutBox(ShortcutItem *scitem)
};
m_shortcutInputs.clear();
delete m_addButton;
m_addButton = new QPushButton(tr("Add"), this);
m_addButton = new QPushButton(Tr::tr("Add"), this);
for (int i = 0; i < qMax(1, scitem->m_keys.size()); ++i)
addShortcutInput(i, scitem->m_keys.value(i));
connect(m_addButton, &QPushButton::clicked, this, [this, addShortcutInput, addButtonToLayout] {
@@ -388,11 +386,11 @@ static bool checkValidity(const QKeySequence &key, QString *warningMessage)
return true;
QTC_ASSERT(warningMessage, return true);
if (!keySequenceIsValid(key)) {
*warningMessage = ShortcutSettingsWidget::tr("Invalid key sequence.");
*warningMessage = Tr::tr("Invalid key sequence.");
return false;
}
if (isTextKeySequence(key))
*warningMessage = ShortcutSettingsWidget::tr("Key sequence will not work in editor.");
*warningMessage = Tr::tr("Key sequence will not work in editor.");
return true;
}
@@ -466,9 +464,9 @@ void ShortcutSettingsWidget::resetToDefault()
void ShortcutSettingsWidget::importAction()
{
FilePath fileName = FileUtils::getOpenFilePath(nullptr,
tr("Import Keyboard Mapping Scheme"),
Tr::tr("Import Keyboard Mapping Scheme"),
schemesPath(),
tr("Keyboard Mapping Scheme (*.kms)"));
Tr::tr("Keyboard Mapping Scheme (*.kms)"));
if (!fileName.isEmpty()) {
CommandsFile cf(fileName);
@@ -506,9 +504,9 @@ void ShortcutSettingsWidget::defaultAction()
void ShortcutSettingsWidget::exportAction()
{
const FilePath filePath
= DocumentManager::getSaveFileNameWithExtension(tr("Export Keyboard Mapping Scheme"),
= DocumentManager::getSaveFileNameWithExtension(Tr::tr("Export Keyboard Mapping Scheme"),
schemesPath(),
tr("Keyboard Mapping Scheme (*.kms)"));
Tr::tr("Keyboard Mapping Scheme (*.kms)"));
if (!filePath.isEmpty()) {
CommandsFile cf(filePath);
cf.exportCommands(m_scitems);
@@ -619,33 +617,33 @@ void ShortcutSettingsWidget::markAllCollisions()
ShortcutInput::ShortcutInput()
{
m_shortcutLabel = new QLabel(tr("Key sequence:"));
m_shortcutLabel = new QLabel(Tr::tr("Key sequence:"));
m_shortcutLabel->setToolTip(
Utils::HostOsInfo::isMacHost()
? QLatin1String("<html><body>")
+ tr("Use \"Cmd\", \"Opt\", \"Ctrl\", and \"Shift\" for modifier keys. "
"Use \"Escape\", \"Backspace\", \"Delete\", \"Insert\", \"Home\", and so "
"on, for special keys. "
"Combine individual keys with \"+\", "
"and combine multiple shortcuts to a shortcut sequence with \",\". "
"For example, if the user must hold the Ctrl and Shift modifier keys "
"while pressing Escape, and then release and press A, "
"enter \"Ctrl+Shift+Escape,A\".")
+ Tr::tr("Use \"Cmd\", \"Opt\", \"Ctrl\", and \"Shift\" for modifier keys. "
"Use \"Escape\", \"Backspace\", \"Delete\", \"Insert\", \"Home\", and so "
"on, for special keys. "
"Combine individual keys with \"+\", "
"and combine multiple shortcuts to a shortcut sequence with \",\". "
"For example, if the user must hold the Ctrl and Shift modifier keys "
"while pressing Escape, and then release and press A, "
"enter \"Ctrl+Shift+Escape,A\".")
+ QLatin1String("</body></html>")
: QLatin1String("<html><body>")
+ tr("Use \"Ctrl\", \"Alt\", \"Meta\", and \"Shift\" for modifier keys. "
"Use \"Escape\", \"Backspace\", \"Delete\", \"Insert\", \"Home\", and so "
"on, for special keys. "
"Combine individual keys with \"+\", "
"and combine multiple shortcuts to a shortcut sequence with \",\". "
"For example, if the user must hold the Ctrl and Shift modifier keys "
"while pressing Escape, and then release and press A, "
"enter \"Ctrl+Shift+Escape,A\".")
+ Tr::tr("Use \"Ctrl\", \"Alt\", \"Meta\", and \"Shift\" for modifier keys. "
"Use \"Escape\", \"Backspace\", \"Delete\", \"Insert\", \"Home\", and so "
"on, for special keys. "
"Combine individual keys with \"+\", "
"and combine multiple shortcuts to a shortcut sequence with \",\". "
"For example, if the user must hold the Ctrl and Shift modifier keys "
"while pressing Escape, and then release and press A, "
"enter \"Ctrl+Shift+Escape,A\".")
+ QLatin1String("</body></html>"));
m_shortcutEdit = new Utils::FancyLineEdit;
m_shortcutEdit->setFiltering(true);
m_shortcutEdit->setPlaceholderText(tr("Enter key sequence as text"));
m_shortcutEdit->setPlaceholderText(Tr::tr("Enter key sequence as text"));
connect(m_shortcutEdit, &Utils::FancyLineEdit::textChanged, this, &ShortcutInput::changed);
m_shortcutButton = new ShortcutButton;
@@ -669,7 +667,7 @@ ShortcutInput::ShortcutInput()
const bool isValid = checkValidity(key, &warningMessage);
m_warningLabel->setText(warningMessage);
if (isValid && m_conflictChecker && m_conflictChecker(key)) {
m_warningLabel->setText(ShortcutSettingsWidget::tr(
m_warningLabel->setText(Tr::tr(
"Key sequence has potential conflicts. <a href=\"#conflicts\">Show.</a>"));
}
return isValid;

View File

@@ -228,7 +228,7 @@ void DocumentManagerPrivate::registerSaveAllAction()
{
ActionContainer *mfile = ActionManager::actionContainer(Constants::M_FILE);
Command *cmd = ActionManager::registerAction(m_saveAllAction, Constants::SAVEALL);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString() : tr("Ctrl+Shift+S")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString() : Tr::tr("Ctrl+Shift+S")));
mfile->addAction(cmd, Constants::G_FILE_SAVE);
m_saveAllAction->setEnabled(false);
connect(m_saveAllAction, &QAction::triggered, [] {
@@ -237,7 +237,7 @@ void DocumentManagerPrivate::registerSaveAllAction()
}
DocumentManagerPrivate::DocumentManagerPrivate() :
m_saveAllAction(new QAction(tr("Save A&ll"), this))
m_saveAllAction(new QAction(Tr::tr("Save A&ll"), this))
{
// we do not want to do too much directly in the focus change event, so queue the connection
connect(qApp,
@@ -688,9 +688,8 @@ static bool saveModifiedFilesHelper(const QList<IDocument *> &documents,
}
if (!roDocuments.isEmpty()) {
ReadOnlyFilesDialog roDialog(roDocuments, ICore::dialogParent());
roDialog.setShowFailWarning(true, DocumentManager::tr(
"Could not save the files.",
"error message"));
roDialog.setShowFailWarning(true, Tr::tr("Could not save the files.",
"error message"));
if (roDialog.exec() == ReadOnlyFilesDialog::RO_Cancel) {
if (cancelled)
(*cancelled) = true;
@@ -732,8 +731,8 @@ bool DocumentManager::saveDocument(IDocument *document,
}
*isReadOnly = false;
}
QMessageBox::critical(ICore::dialogParent(), tr("File Error"),
tr("Error while saving file: %1").arg(errorString));
QMessageBox::critical(ICore::dialogParent(), Tr::tr("File Error"),
Tr::tr("Error while saving file: %1").arg(errorString));
out:
ret = false;
}
@@ -826,8 +825,8 @@ FilePath DocumentManager::getSaveFileName(const QString &title, const FilePath &
if (!suffixOk && !suffixes.isEmpty()) {
filePath = filePath.stringAppended(suffixes.at(0));
if (filePath.exists()) {
if (QMessageBox::warning(ICore::dialogParent(), tr("Overwrite?"),
tr("An item named \"%1\" already exists at this location. "
if (QMessageBox::warning(ICore::dialogParent(), Tr::tr("Overwrite?"),
Tr::tr("An item named \"%1\" already exists at this location. "
"Do you want to overwrite it?").arg(filePath.toUserOutput()),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
repeat = true;
@@ -877,7 +876,7 @@ FilePath DocumentManager::getSaveAsFileName(const IDocument *document)
if (selectedFilter.isEmpty())
selectedFilter = Utils::mimeTypeForName(document->mimeType()).filterString();
return getSaveFileName(tr("Save File As"),
return getSaveFileName(Tr::tr("Save File As"),
fileDialogPath,
filter,
&selectedFilter);
@@ -1036,7 +1035,7 @@ FilePaths DocumentManager::getOpenFileNames(const QString &filters,
QFileDialog::Options options)
{
const FilePath path = pathIn.isEmpty() ? fileDialogInitialDirectory() : pathIn;
const FilePaths files = FileUtils::getOpenFilePaths(nullptr, tr("Open File"), path, filters,
const FilePaths files = FileUtils::getOpenFilePaths(nullptr, Tr::tr("Open File"), path, filters,
selectedFilter, options);
if (!files.isEmpty())
setFileDialogLastVisitedDirectory(files.front().absolutePath());
@@ -1286,7 +1285,7 @@ void DocumentManager::checkForReload()
}
if (!success) {
if (errorString.isEmpty())
errorStrings << tr("Cannot reload %1").arg(document->filePath().toUserOutput());
errorStrings << Tr::tr("Cannot reload %1").arg(document->filePath().toUserOutput());
else
errorStrings << errorString;
}
@@ -1300,7 +1299,7 @@ void DocumentManager::checkForReload()
}
if (!errorStrings.isEmpty())
QMessageBox::critical(ICore::dialogParent(), tr("File Error"),
QMessageBox::critical(ICore::dialogParent(), Tr::tr("File Error"),
errorStrings.join(QLatin1Char('\n')));
// handle deleted files

View File

@@ -1,19 +1,20 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "editmode.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "editmode.h"
#include "coreplugintr.h"
#include "editormanager/editormanager.h"
#include "editormanager/ieditor.h"
#include "icore.h"
#include "modemanager.h"
#include "minisplitter.h"
#include "modemanager.h"
#include "navigationwidget.h"
#include "outputpane.h"
#include "rightpane.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <QLatin1String>
#include <QVBoxLayout>
#include <QWidget>
#include <QIcon>
@@ -26,7 +27,7 @@ EditMode::EditMode() :
m_rightSplitWidgetLayout(new QVBoxLayout)
{
setObjectName(QLatin1String("EditMode"));
setDisplayName(tr("Edit"));
setDisplayName(Tr::tr("Edit"));
setIcon(Utils::Icon::modeIcon(Icons::MODE_EDIT_CLASSIC,
Icons::MODE_EDIT_FLAT, Icons::MODE_EDIT_FLAT_ACTIVE));
setPriority(Constants::P_MODE_EDIT);

View File

@@ -5,8 +5,9 @@
#include "documentmodel_p.h"
#include "ieditor.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/idocument.h>
#include "../coreplugintr.h"
#include "../documentmanager.h"
#include "../idocument.h"
#include <utils/algorithm.h>
#include <utils/dropsupport.h>
@@ -290,9 +291,9 @@ QVariant DocumentModelPrivate::data(const QModelIndex &index, int role) const
// <no document> entry
switch (role) {
case Qt::DisplayRole:
return tr("<no document>");
return Tr::tr("<no document>");
case Qt::ToolTipRole:
return tr("No document is selected.");
return Tr::tr("No document is selected.");
default:
return QVariant();
}

View File

@@ -4,42 +4,39 @@
#include "editormanager.h"
#include "editormanager_p.h"
#include "../coreconstants.h"
#include "editorwindow.h"
#include "editorview.h"
#include "openeditorswindow.h"
#include "openeditorsview.h"
#include "documentmodel.h"
#include "documentmodel_p.h"
#include "editorview.h"
#include "editorwindow.h"
#include "ieditor.h"
#include "openeditorsview.h"
#include "openeditorswindow.h"
#include "../actionmanager/actioncontainer.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include "../dialogs/openwithdialog.h"
#include "../dialogs/readonlyfilesdialog.h"
#include "../diffservice.h"
#include "../documentmanager.h"
#include "../editormanager/ieditorfactory.h"
#include "../editormanager/ieditorfactory_p.h"
#include "../editormanager/iexternaleditor.h"
#include "../fileutils.h"
#include "../find/searchresultitem.h"
#include "../findplaceholder.h"
#include "../icore.h"
#include "../iversioncontrol.h"
#include "../modemanager.h"
#include "../outputpane.h"
#include "../outputpanemanager.h"
#include "../rightpane.h"
#include "../settingsdatabase.h"
#include "../vcsmanager.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/dialogs/openwithdialog.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/diffservice.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/ieditorfactory_p.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <coreplugin/editortoolbar.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/find/searchresultitem.h>
#include <coreplugin/icore.h>
#include <coreplugin/imode.h>
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/outputpane.h>
#include <coreplugin/outputpanemanager.h>
#include <coreplugin/rightpane.h>
#include <coreplugin/settingsdatabase.h>
#include <coreplugin/vcsmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
@@ -56,33 +53,30 @@
#include <utils/stringutils.h>
#include <utils/utilsicons.h>
#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QDateTime>
#include <QDebug>
#include <QFileDialog>
#include <QFileInfo>
#include <QHash>
#include <QMainWindow>
#include <QMap>
#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include <QSet>
#include <QSettings>
#include <QSplitter>
#include <QTextCodec>
#include <QTimer>
#include <QAction>
#include <QApplication>
#include <QFileDialog>
#include <QMainWindow>
#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
#include <QSplitter>
#include <QVBoxLayout>
#include <algorithm>
#if defined(WITH_TESTS)
#include <coreplugin/coreplugin.h>
#include <QTest>
#endif
@@ -110,12 +104,11 @@ static const char scratchBufferKey[] = "_q_emScratchBuffer";
static const int kMaxViews = 20;
// for lupdate
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
namespace Core {
static void checkEditorFlags(EditorManager::OpenEditorFlags flags)
{
if (flags & EditorManager::OpenInOtherSplit) {
@@ -372,36 +365,36 @@ static void setFocusToEditorViewAndUnmaximizePanes(EditorView *view)
EditorManagerPrivate::EditorManagerPrivate(QObject *parent) :
QObject(parent),
m_revertToSavedAction(new QAction(EditorManager::tr("Revert to Saved"), this)),
m_revertToSavedAction(new QAction(::Core::Tr::tr("Revert to Saved"), this)),
m_saveAction(new QAction(this)),
m_saveAsAction(new QAction(this)),
m_closeCurrentEditorAction(new QAction(EditorManager::tr("Close"), this)),
m_closeAllEditorsAction(new QAction(EditorManager::tr("Close All"), this)),
m_closeOtherDocumentsAction(new QAction(EditorManager::tr("Close Others"), this)),
m_closeAllEditorsExceptVisibleAction(new QAction(EditorManager::tr("Close All Except Visible"), this)),
m_gotoNextDocHistoryAction(new QAction(EditorManager::tr("Next Open Document in History"), this)),
m_gotoPreviousDocHistoryAction(new QAction(EditorManager::tr("Previous Open Document in History"), this)),
m_goBackAction(new QAction(Utils::Icons::PREV.icon(), EditorManager::tr("Go Back"), this)),
m_goForwardAction(new QAction(Utils::Icons::NEXT.icon(), EditorManager::tr("Go Forward"), this)),
m_gotoLastEditAction(new QAction(EditorManager::tr("Go to Last Edit"), this)),
m_copyFilePathContextAction(new QAction(EditorManager::tr("Copy Full Path"), this)),
m_copyLocationContextAction(new QAction(EditorManager::tr("Copy Path and Line Number"), this)),
m_copyFileNameContextAction(new QAction(EditorManager::tr("Copy File Name"), this)),
m_saveCurrentEditorContextAction(new QAction(EditorManager::tr("&Save"), this)),
m_saveAsCurrentEditorContextAction(new QAction(EditorManager::tr("Save &As..."), this)),
m_revertToSavedCurrentEditorContextAction(new QAction(EditorManager::tr("Revert to Saved"), this)),
m_closeCurrentEditorContextAction(new QAction(EditorManager::tr("Close"), this)),
m_closeAllEditorsContextAction(new QAction(EditorManager::tr("Close All"), this)),
m_closeOtherDocumentsContextAction(new QAction(EditorManager::tr("Close Others"), this)),
m_closeAllEditorsExceptVisibleContextAction(new QAction(EditorManager::tr("Close All Except Visible"), this)),
m_closeCurrentEditorAction(new QAction(::Core::Tr::tr("Close"), this)),
m_closeAllEditorsAction(new QAction(::Core::Tr::tr("Close All"), this)),
m_closeOtherDocumentsAction(new QAction(::Core::Tr::tr("Close Others"), this)),
m_closeAllEditorsExceptVisibleAction(new QAction(::Core::Tr::tr("Close All Except Visible"), this)),
m_gotoNextDocHistoryAction(new QAction(::Core::Tr::tr("Next Open Document in History"), this)),
m_gotoPreviousDocHistoryAction(new QAction(::Core::Tr::tr("Previous Open Document in History"), this)),
m_goBackAction(new QAction(Utils::Icons::PREV.icon(), ::Core::Tr::tr("Go Back"), this)),
m_goForwardAction(new QAction(Utils::Icons::NEXT.icon(), ::Core::Tr::tr("Go Forward"), this)),
m_gotoLastEditAction(new QAction(::Core::Tr::tr("Go to Last Edit"), this)),
m_copyFilePathContextAction(new QAction(::Core::Tr::tr("Copy Full Path"), this)),
m_copyLocationContextAction(new QAction(::Core::Tr::tr("Copy Path and Line Number"), this)),
m_copyFileNameContextAction(new QAction(::Core::Tr::tr("Copy File Name"), this)),
m_saveCurrentEditorContextAction(new QAction(::Core::Tr::tr("&Save"), this)),
m_saveAsCurrentEditorContextAction(new QAction(::Core::Tr::tr("Save &As..."), this)),
m_revertToSavedCurrentEditorContextAction(new QAction(::Core::Tr::tr("Revert to Saved"), this)),
m_closeCurrentEditorContextAction(new QAction(::Core::Tr::tr("Close"), this)),
m_closeAllEditorsContextAction(new QAction(::Core::Tr::tr("Close All"), this)),
m_closeOtherDocumentsContextAction(new QAction(::Core::Tr::tr("Close Others"), this)),
m_closeAllEditorsExceptVisibleContextAction(new QAction(::Core::Tr::tr("Close All Except Visible"), this)),
m_openGraphicalShellAction(new QAction(FileUtils::msgGraphicalShellAction(), this)),
m_openGraphicalShellContextAction(new QAction(FileUtils::msgGraphicalShellAction(), this)),
m_showInFileSystemViewAction(new QAction(FileUtils::msgFileSystemAction(), this)),
m_showInFileSystemViewContextAction(new QAction(FileUtils::msgFileSystemAction(), this)),
m_openTerminalAction(new QAction(FileUtils::msgTerminalHereAction(), this)),
m_findInDirectoryAction(new QAction(FileUtils::msgFindInDirectory(), this)),
m_filePropertiesAction(new QAction(tr("Properties..."), this)),
m_pinAction(new QAction(tr("Pin"), this))
m_filePropertiesAction(new QAction(::Core::Tr::tr("Properties..."), this)),
m_pinAction(new QAction(::Core::Tr::tr("Pin"), this))
{
d = this;
}
@@ -445,7 +438,7 @@ void EditorManagerPrivate::init()
Command *cmd = ActionManager::registerAction(m_revertToSavedAction,
Constants::REVERTTOSAVED, editManagerContext);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(tr("Revert File to Saved"));
cmd->setDescription(::Core::Tr::tr("Revert File to Saved"));
mfile->addAction(cmd, Constants::G_FILE_SAVE);
connect(m_revertToSavedAction, &QAction::triggered, m_instance, &EditorManager::revertToSaved);
@@ -466,7 +459,7 @@ void EditorManagerPrivate::init()
// Close Action
cmd = ActionManager::registerAction(m_closeCurrentEditorAction, Constants::CLOSE, editManagerContext, true);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+W")));
cmd->setDefaultKeySequence(QKeySequence(::Core::Tr::tr("Ctrl+W")));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(m_closeCurrentEditorAction->text());
mfile->addAction(cmd, Constants::G_FILE_CLOSE);
@@ -475,17 +468,17 @@ void EditorManagerPrivate::init()
if (HostOsInfo::isWindowsHost()) {
// workaround for QTCREATORBUG-72
QAction *action = new QAction(tr("Alternative Close"), this);
QAction *action = new QAction(::Core::Tr::tr("Alternative Close"), this);
cmd = ActionManager::registerAction(action, Constants::CLOSE_ALTERNATIVE, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+F4")));
cmd->setDescription(EditorManager::tr("Close"));
cmd->setDefaultKeySequence(QKeySequence(::Core::Tr::tr("Ctrl+F4")));
cmd->setDescription(::Core::Tr::tr("Close"));
connect(action, &QAction::triggered,
m_instance, &EditorManager::slotCloseCurrentEditorOrDocument);
}
// Close All Action
cmd = ActionManager::registerAction(m_closeAllEditorsAction, Constants::CLOSEALL, editManagerContext, true);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+W")));
cmd->setDefaultKeySequence(QKeySequence(::Core::Tr::tr("Ctrl+Shift+W")));
mfile->addAction(cmd, Constants::G_FILE_CLOSE);
connect(m_closeAllEditorsAction, &QAction::triggered, m_instance, &EditorManager::closeAllDocuments);
@@ -572,28 +565,28 @@ void EditorManagerPrivate::init()
// Goto Previous In History Action
cmd = ActionManager::registerAction(m_gotoPreviousDocHistoryAction, Constants::GOTOPREVINHISTORY, editDesignContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Alt+Tab") : tr("Ctrl+Tab")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Alt+Tab") : ::Core::Tr::tr("Ctrl+Tab")));
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
connect(m_gotoPreviousDocHistoryAction, &QAction::triggered,
this, &EditorManagerPrivate::gotoPreviousDocHistory);
// Goto Next In History Action
cmd = ActionManager::registerAction(m_gotoNextDocHistoryAction, Constants::GOTONEXTINHISTORY, editDesignContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Alt+Shift+Tab") : tr("Ctrl+Shift+Tab")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Alt+Shift+Tab") : ::Core::Tr::tr("Ctrl+Shift+Tab")));
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
connect(m_gotoNextDocHistoryAction, &QAction::triggered,
this, &EditorManagerPrivate::gotoNextDocHistory);
// Go back in navigation history
cmd = ActionManager::registerAction(m_goBackAction, Constants::GO_BACK, editDesignContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Alt+Left") : tr("Alt+Left")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Ctrl+Alt+Left") : ::Core::Tr::tr("Alt+Left")));
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
connect(m_goBackAction, &QAction::triggered,
m_instance, &EditorManager::goBackInNavigationHistory);
// Go forward in navigation history
cmd = ActionManager::registerAction(m_goForwardAction, Constants::GO_FORWARD, editDesignContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Alt+Right") : tr("Alt+Right")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Ctrl+Alt+Right") : ::Core::Tr::tr("Alt+Right")));
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
connect(m_goForwardAction, &QAction::triggered,
m_instance, &EditorManager::goForwardInNavigationHistory);
@@ -604,57 +597,57 @@ void EditorManagerPrivate::init()
connect(m_gotoLastEditAction, &QAction::triggered,
this, &EditorManagerPrivate::gotoLastEditLocation);
m_splitAction = new QAction(Utils::Icons::SPLIT_HORIZONTAL.icon(), tr("Split"), this);
m_splitAction = new QAction(Utils::Icons::SPLIT_HORIZONTAL.icon(), ::Core::Tr::tr("Split"), this);
cmd = ActionManager::registerAction(m_splitAction, Constants::SPLIT, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,2") : tr("Ctrl+E,2")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,2") : ::Core::Tr::tr("Ctrl+E,2")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_splitAction, &QAction::triggered, this, [] { split(Qt::Vertical); });
m_splitSideBySideAction = new QAction(Utils::Icons::SPLIT_VERTICAL.icon(),
tr("Split Side by Side"), this);
::Core::Tr::tr("Split Side by Side"), this);
cmd = ActionManager::registerAction(m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,3") : tr("Ctrl+E,3")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,3") : ::Core::Tr::tr("Ctrl+E,3")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_splitSideBySideAction, &QAction::triggered, m_instance, &EditorManager::splitSideBySide);
m_splitNewWindowAction = new QAction(tr("Open in New Window"), this);
m_splitNewWindowAction = new QAction(::Core::Tr::tr("Open in New Window"), this);
cmd = ActionManager::registerAction(m_splitNewWindowAction, Constants::SPLIT_NEW_WINDOW, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,4") : tr("Ctrl+E,4")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,4") : ::Core::Tr::tr("Ctrl+E,4")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_splitNewWindowAction, &QAction::triggered,
this, [] { splitNewWindow(currentEditorView()); });
m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this);
m_removeCurrentSplitAction = new QAction(::Core::Tr::tr("Remove Current Split"), this);
cmd = ActionManager::registerAction(m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,0") : tr("Ctrl+E,0")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,0") : ::Core::Tr::tr("Ctrl+E,0")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_removeCurrentSplitAction, &QAction::triggered,
this, &EditorManagerPrivate::removeCurrentSplit);
m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this);
m_removeAllSplitsAction = new QAction(::Core::Tr::tr("Remove All Splits"), this);
cmd = ActionManager::registerAction(m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,1") : tr("Ctrl+E,1")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,1") : ::Core::Tr::tr("Ctrl+E,1")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_removeAllSplitsAction, &QAction::triggered,
this, &EditorManagerPrivate::removeAllSplits);
m_gotoPreviousSplitAction = new QAction(tr("Go to Previous Split or Window"), this);
m_gotoPreviousSplitAction = new QAction(::Core::Tr::tr("Go to Previous Split or Window"), this);
cmd = ActionManager::registerAction(m_gotoPreviousSplitAction, Constants::GOTO_PREV_SPLIT, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,i") : tr("Ctrl+E,i")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,i") : ::Core::Tr::tr("Ctrl+E,i")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_gotoPreviousSplitAction, &QAction::triggered,
this, &EditorManagerPrivate::gotoPreviousSplit);
m_gotoNextSplitAction = new QAction(tr("Go to Next Split or Window"), this);
m_gotoNextSplitAction = new QAction(::Core::Tr::tr("Go to Next Split or Window"), this);
cmd = ActionManager::registerAction(m_gotoNextSplitAction, Constants::GOTO_NEXT_SPLIT, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,o") : tr("Ctrl+E,o")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? ::Core::Tr::tr("Meta+E,o") : ::Core::Tr::tr("Ctrl+E,o")));
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
connect(m_gotoNextSplitAction, &QAction::triggered, this, &EditorManagerPrivate::gotoNextSplit);
ActionContainer *medit = ActionManager::actionContainer(Constants::M_EDIT);
ActionContainer *advancedMenu = ActionManager::createMenu(Constants::M_EDIT_ADVANCED);
medit->addMenu(advancedMenu, Constants::G_EDIT_ADVANCED);
advancedMenu->menu()->setTitle(tr("Ad&vanced"));
advancedMenu->menu()->setTitle(::Core::Tr::tr("Ad&vanced"));
advancedMenu->appendGroup(Constants::G_EDIT_FORMAT);
advancedMenu->appendGroup(Constants::G_EDIT_TEXT);
advancedMenu->appendGroup(Constants::G_EDIT_COLLAPSING);
@@ -693,21 +686,21 @@ void EditorManagerPrivate::init()
d->m_openEditorsFactory = new OpenEditorsViewFactory();
globalMacroExpander()->registerFileVariables(kCurrentDocumentPrefix, tr("Current document"),
globalMacroExpander()->registerFileVariables(kCurrentDocumentPrefix, ::Core::Tr::tr("Current document"),
[] {
IDocument *document = EditorManager::currentDocument();
return document ? document->filePath() : FilePath();
});
globalMacroExpander()->registerIntVariable(kCurrentDocumentXPos,
tr("X-coordinate of the current editor's upper left corner, relative to screen."),
::Core::Tr::tr("X-coordinate of the current editor's upper left corner, relative to screen."),
[]() -> int {
IEditor *editor = EditorManager::currentEditor();
return editor ? editor->widget()->mapToGlobal(QPoint(0, 0)).x() : 0;
});
globalMacroExpander()->registerIntVariable(kCurrentDocumentYPos,
tr("Y-coordinate of the current editor's upper left corner, relative to screen."),
::Core::Tr::tr("Y-coordinate of the current editor's upper left corner, relative to screen."),
[]() -> int {
IEditor *editor = EditorManager::currentEditor();
return editor ? editor->widget()->mapToGlobal(QPoint(0, 0)).y() : 0;
@@ -748,8 +741,8 @@ bool EditorManagerPrivate::skipOpeningBigTextFile(const FilePath &filePath)
const double fileSizeInMB = fileSize / 1000.0 / 1000.0;
if (fileSizeInMB > d->m_settings.bigFileSizeLimitInMB
&& fileSize < EditorManager::maxTextFileSize()) {
const QString title = EditorManager::tr("Continue Opening Huge Text File?");
const QString text = EditorManager::tr(
const QString title = ::Core::Tr::tr("Continue Opening Huge Text File?");
const QString text = ::Core::Tr::tr(
"The text file \"%1\" has the size %2MB and might take more memory to open"
" and process than available.\n"
"\n"
@@ -819,8 +812,8 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const FilePath &file
}
if (factories.isEmpty()) {
Utils::MimeType mimeType = Utils::mimeTypeForFile(filePath);
QMessageBox msgbox(QMessageBox::Critical, EditorManager::tr("File Error"),
tr("Could not open \"%1\": Cannot open files of type \"%2\".")
QMessageBox msgbox(QMessageBox::Critical, ::Core::Tr::tr("File Error"),
::Core::Tr::tr("Could not open \"%1\": Cannot open files of type \"%2\".")
.arg(realFp.toUserOutput(), mimeType.name()),
QMessageBox::Ok, ICore::dialogParent());
msgbox.exec();
@@ -858,8 +851,8 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const FilePath &file
editor = nullptr;
if (openResult == IDocument::OpenResult::ReadError) {
QMessageBox msgbox(QMessageBox::Critical,
EditorManager::tr("File Error"),
tr("Could not open \"%1\" for reading. "
::Core::Tr::tr("File Error"),
::Core::Tr::tr("Could not open \"%1\" for reading. "
"Either the file does not exist or you do not have "
"the permissions to open it.")
.arg(realFp.toUserOutput()),
@@ -879,10 +872,10 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const FilePath &file
}
if (errorString.isEmpty())
errorString = tr("Could not open \"%1\": Unknown error.").arg(realFp.toUserOutput());
errorString = ::Core::Tr::tr("Could not open \"%1\": Unknown error.").arg(realFp.toUserOutput());
QMessageBox msgbox(QMessageBox::Critical,
EditorManager::tr("File Error"),
::Core::Tr::tr("File Error"),
errorString,
QMessageBox::Open | QMessageBox::Cancel,
ICore::dialogParent());
@@ -2042,14 +2035,14 @@ void EditorManagerPrivate::updateMakeWritableWarning()
// we are about to change a read-only file, warn user
if (promptVCS) {
InfoBarEntry info(Id(kMakeWritableWarning),
tr("<b>Warning:</b> This file was not opened in %1 yet.")
::Core::Tr::tr("<b>Warning:</b> This file was not opened in %1 yet.")
.arg(versionControl->displayName()));
info.addCustomButton(tr("Open"), &vcsOpenCurrentEditor);
info.addCustomButton(::Core::Tr::tr("Open"), &vcsOpenCurrentEditor);
document->infoBar()->addInfo(info);
} else {
InfoBarEntry info(Id(kMakeWritableWarning),
tr("<b>Warning:</b> You are changing a read-only file."));
info.addCustomButton(tr("Make Writable"), &makeCurrentEditorWritable);
::Core::Tr::tr("<b>Warning:</b> You are changing a read-only file."));
info.addCustomButton(::Core::Tr::tr("Make Writable"), &makeCurrentEditorWritable);
document->infoBar()->addInfo(info);
}
} else {
@@ -2069,15 +2062,15 @@ void EditorManagerPrivate::setupSaveActions(IDocument *document, QAction *saveAc
if (document && !document->displayName().isEmpty()) {
const QString quotedName = QLatin1Char('"')
+ Utils::quoteAmpersands(document->displayName()) + QLatin1Char('"');
saveAction->setText(tr("&Save %1").arg(quotedName));
saveAsAction->setText(tr("Save %1 &As...").arg(quotedName));
saveAction->setText(::Core::Tr::tr("&Save %1").arg(quotedName));
saveAsAction->setText(::Core::Tr::tr("Save %1 &As...").arg(quotedName));
revertToSavedAction->setText(document->isModified()
? tr("Revert %1 to Saved").arg(quotedName)
: tr("Reload %1").arg(quotedName));
? ::Core::Tr::tr("Revert %1 to Saved").arg(quotedName)
: ::Core::Tr::tr("Reload %1").arg(quotedName));
} else {
saveAction->setText(EditorManager::tr("&Save"));
saveAsAction->setText(EditorManager::tr("Save &As..."));
revertToSavedAction->setText(EditorManager::tr("Revert to Saved"));
saveAction->setText(::Core::Tr::tr("&Save"));
saveAsAction->setText(::Core::Tr::tr("Save &As..."));
revertToSavedAction->setText(::Core::Tr::tr("Revert to Saved"));
}
}
@@ -2097,10 +2090,11 @@ void EditorManagerPrivate::updateActions()
setupSaveActions(curDocument, d->m_saveAction, d->m_saveAsAction, d->m_revertToSavedAction);
d->m_closeCurrentEditorAction->setEnabled(curDocument);
d->m_closeCurrentEditorAction->setText(tr("Close %1").arg(quotedName));
d->m_closeCurrentEditorAction->setText(::Core::Tr::tr("Close %1").arg(quotedName));
d->m_closeAllEditorsAction->setEnabled(openedCount > 0);
d->m_closeOtherDocumentsAction->setEnabled(openedCount > 1);
d->m_closeOtherDocumentsAction->setText((openedCount > 1 ? tr("Close All Except %1").arg(quotedName) : tr("Close Others")));
d->m_closeOtherDocumentsAction->setText((openedCount > 1 ? ::Core::Tr::tr("Close All Except %1").arg(quotedName)
: ::Core::Tr::tr("Close Others")));
d->m_closeAllEditorsExceptVisibleAction->setEnabled(visibleDocumentsCount() < openedCount);
@@ -2290,8 +2284,8 @@ void EditorManagerPrivate::vcsOpenCurrentEditor()
return;
if (!versionControl->vcsOpen(document->filePath())) {
QMessageBox::warning(ICore::dialogParent(), tr("Cannot Open File"),
tr("Cannot open the file for editing with VCS."));
QMessageBox::warning(ICore::dialogParent(), ::Core::Tr::tr("Cannot Open File"),
::Core::Tr::tr("Cannot open the file for editing with VCS."));
}
}
@@ -2365,7 +2359,7 @@ void EditorManagerPrivate::autoSave()
}
if (!errors.isEmpty())
QMessageBox::critical(ICore::dialogParent(),
tr("File Error"),
::Core::Tr::tr("File Error"),
errors.join(QLatin1Char('\n')));
emit m_instance->autoSaved();
}
@@ -2569,18 +2563,18 @@ void EditorManagerPrivate::revertToSaved(IDocument *document)
return;
if (document->isModified()) {
QMessageBox msgBox(QMessageBox::Question,
tr("Revert to Saved"),
tr("You will lose your current changes if you proceed reverting %1.")
::Core::Tr::tr("Revert to Saved"),
::Core::Tr::tr("You will lose your current changes if you proceed reverting %1.")
.arg(QDir::toNativeSeparators(fileName)),
QMessageBox::Yes | QMessageBox::No,
ICore::dialogParent());
msgBox.button(QMessageBox::Yes)->setText(tr("Proceed"));
msgBox.button(QMessageBox::No)->setText(tr("Cancel"));
msgBox.button(QMessageBox::Yes)->setText(::Core::Tr::tr("Proceed"));
msgBox.button(QMessageBox::No)->setText(::Core::Tr::tr("Cancel"));
QPushButton *diffButton = nullptr;
auto diffService = DiffService::instance();
if (diffService)
diffButton = msgBox.addButton(tr("Cancel && &Diff"), QMessageBox::RejectRole);
diffButton = msgBox.addButton(::Core::Tr::tr("Cancel && &Diff"), QMessageBox::RejectRole);
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setEscapeButton(QMessageBox::No);
@@ -2594,7 +2588,7 @@ void EditorManagerPrivate::revertToSaved(IDocument *document)
}
QString errorString;
if (!document->reload(&errorString, IDocument::FlagReload, IDocument::TypeContents))
QMessageBox::critical(ICore::dialogParent(), tr("File Error"), errorString);
QMessageBox::critical(ICore::dialogParent(), ::Core::Tr::tr("File Error"), errorString);
}
void EditorManagerPrivate::autoSuspendDocuments()
@@ -2887,11 +2881,11 @@ void EditorManager::addSaveAndCloseEditorActions(QMenu *contextMenu, DocumentMod
const QString quotedDisplayName = entry ? Utils::quoteAmpersands(entry->displayName()) : QString();
d->m_closeCurrentEditorContextAction->setText(entry
? tr("Close \"%1\"").arg(quotedDisplayName)
: tr("Close Editor"));
? ::Core::Tr::tr("Close \"%1\"").arg(quotedDisplayName)
: ::Core::Tr::tr("Close Editor"));
d->m_closeOtherDocumentsContextAction->setText(entry
? tr("Close All Except \"%1\"").arg(quotedDisplayName)
: tr("Close Other Editors"));
? ::Core::Tr::tr("Close All Except \"%1\"").arg(quotedDisplayName)
: ::Core::Tr::tr("Close Other Editors"));
d->m_closeCurrentEditorContextAction->setEnabled(entry != nullptr);
d->m_closeOtherDocumentsContextAction->setEnabled(entry != nullptr);
d->m_closeAllEditorsContextAction->setEnabled(!DocumentModel::entries().isEmpty());
@@ -2912,10 +2906,10 @@ void EditorManager::addPinEditorActions(QMenu *contextMenu, DocumentModel::Entry
const QString quotedDisplayName = entry ? Utils::quoteAmpersands(entry->displayName()) : QString();
if (entry) {
d->m_pinAction->setText(entry->pinned
? tr("Unpin \"%1\"").arg(quotedDisplayName)
: tr("Pin \"%1\"").arg(quotedDisplayName));
? ::Core::Tr::tr("Unpin \"%1\"").arg(quotedDisplayName)
: ::Core::Tr::tr("Pin \"%1\"").arg(quotedDisplayName));
} else {
d->m_pinAction->setText(tr("Pin Editor"));
d->m_pinAction->setText(::Core::Tr::tr("Pin Editor"));
}
d->m_pinAction->setEnabled(entry != nullptr);
contextMenu->addAction(d->m_pinAction);
@@ -2940,7 +2934,7 @@ void EditorManager::addNativeDirAndOpenWithActions(QMenu *contextMenu, DocumentM
contextMenu->addAction(d->m_openTerminalAction);
contextMenu->addAction(d->m_findInDirectoryAction);
contextMenu->addAction(d->m_filePropertiesAction);
QMenu *openWith = contextMenu->addMenu(tr("Open With"));
QMenu *openWith = contextMenu->addMenu(::Core::Tr::tr("Open With"));
openWith->setEnabled(enabled);
if (enabled)
populateOpenWithMenu(openWith, entry->filePath());
@@ -3223,7 +3217,7 @@ bool EditorManager::openExternalEditor(const FilePath &filePath, Id editorId)
const bool ok = ee->startEditor(filePath, &errorMessage);
QApplication::restoreOverrideCursor();
if (!ok)
QMessageBox::critical(ICore::dialogParent(), tr("Opening File"), errorMessage);
QMessageBox::critical(ICore::dialogParent(), ::Core::Tr::tr("Opening File"), errorMessage);
return ok;
}
@@ -3811,3 +3805,5 @@ void EditorManager::setWindowTitleVcsTopicHandler(WindowTitleHandler handler)
{
d->m_titleVcsTopicHandler = handler;
}
} // Core

View File

@@ -2,20 +2,20 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "openeditorsview.h"
#include "documentmodel.h"
#include "editormanager.h"
#include "ieditor.h"
#include "documentmodel.h"
#include "../actionmanager/command.h"
#include "../coreplugintr.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <utils/fsengine/fileiconprovider.h>
#include <utils/qtcassert.h>
#include <QApplication>
#include <QMenu>
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
////
// OpenEditorsWidget
@@ -23,7 +23,7 @@ using namespace Core::Internal;
OpenEditorsWidget::OpenEditorsWidget()
{
setWindowTitle(tr("Open Documents"));
setWindowTitle(Tr::tr("Open Documents"));
setDragEnabled(true);
setDragDropMode(QAbstractItemView::DragOnly);
@@ -111,9 +111,8 @@ void OpenEditorsWidget::contextMenuRequested(QPoint pos)
OpenEditorsViewFactory::OpenEditorsViewFactory()
{
setId("Open Documents");
setDisplayName(OpenEditorsWidget::tr("Open Documents"));
setActivationSequence(QKeySequence(useMacShortcuts ? OpenEditorsWidget::tr("Meta+O")
: OpenEditorsWidget::tr("Alt+O")));
setDisplayName(Tr::tr("Open Documents"));
setActivationSequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+O") : Tr::tr("Alt+O")));
setPriority(200);
}
@@ -265,3 +264,5 @@ void ProxyModel::sourceRowsAboutToBeInserted(const QModelIndex &parent, int star
int realEnd = parent.isValid() || end == 0 ? end : end - 1;
beginInsertRows(parent, realStart, realEnd);
}
} // Core::Internal

View File

@@ -45,7 +45,6 @@ private:
class OpenEditorsWidget : public OpenDocumentsTreeView
{
Q_DECLARE_TR_FUNCTIONS(OpenEditorsWidget)
public:
OpenEditorsWidget();
~OpenEditorsWidget() override;

View File

@@ -6,7 +6,8 @@
#include "editormanager.h"
#include "editormanager_p.h"
#include "editorview.h"
#include <coreplugin/idocument.h>
#include "../coreplugintr.h"
#include "../idocument.h"
#include <utils/fsengine/fileiconprovider.h>
#include <utils/hostosinfo.h>
@@ -21,8 +22,7 @@
Q_DECLARE_METATYPE(Core::Internal::EditorView*)
Q_DECLARE_METATYPE(Core::IDocument*)
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
enum class Role
{
@@ -226,7 +226,7 @@ void OpenEditorsWindow::addItem(DocumentModel::Entry *entry,
QTC_ASSERT(!title.isEmpty(), return);
auto item = new QTreeWidgetItem();
if (entry->document->isModified())
title += tr("*");
title += Tr::tr("*");
item->setIcon(0, !entry->filePath().isEmpty() && entry->document->isFileReadOnly()
? DocumentModel::lockedIcon() : Utils::FileIconProvider::icon(entry->filePath()));
item->setText(0, title);
@@ -240,3 +240,5 @@ void OpenEditorsWindow::addItem(DocumentModel::Entry *entry,
if (m_editorList->topLevelItemCount() == 1)
m_editorList->setCurrentItem(item);
}
} // Core::Internal

View File

@@ -3,20 +3,22 @@
#include "systemeditor.h"
#include "../coreplugintr.h"
#include <utils/filepath.h>
#include <QStringList>
#include <QUrl>
#include <QDesktopServices>
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
namespace Core::Internal {
SystemEditor::SystemEditor()
{
setId("CorePlugin.OpenWithSystemEditor");
setDisplayName(tr("System Editor"));
setDisplayName(Tr::tr("System Editor"));
setMimeTypes({"application/octet-stream"});
}
@@ -28,8 +30,10 @@ bool SystemEditor::startEditor(const FilePath &filePath, QString *errorMessage)
url.setScheme(QLatin1String("file"));
if (!QDesktopServices::openUrl(url)) {
if (errorMessage)
*errorMessage = tr("Could not open URL %1.").arg(url.toString());
*errorMessage = Tr::tr("Could not open URL %1.").arg(url.toString());
return false;
}
return true;
}
} // Core::Internal

View File

@@ -3,13 +3,14 @@
#include "editortoolbar.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/editormanager_p.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "coreplugintr.h"
#include "editormanager/documentmodel.h"
#include "editormanager/editormanager.h"
#include "editormanager/editormanager_p.h"
#include "editormanager/ieditor.h"
#include "icore.h"
#include <utils/filepath.h>
#include <utils/fsengine/fileiconprovider.h>
@@ -72,16 +73,16 @@ EditorToolBarPrivate::EditorToolBarPrivate(QWidget *parent, EditorToolBar *q) :
m_lockButton(new QToolButton(q)),
m_dragHandle(new QToolButton(q)),
m_dragHandleMenu(nullptr),
m_goBackAction(new QAction(Utils::Icons::PREV_TOOLBAR.icon(), EditorManager::tr("Go Back"), parent)),
m_goForwardAction(new QAction(Utils::Icons::NEXT_TOOLBAR.icon(), EditorManager::tr("Go Forward"), parent)),
m_goBackAction(new QAction(Utils::Icons::PREV_TOOLBAR.icon(), Tr::tr("Go Back"), parent)),
m_goForwardAction(new QAction(Utils::Icons::NEXT_TOOLBAR.icon(), Tr::tr("Go Forward"), parent)),
m_backButton(new QToolButton(q)),
m_forwardButton(new QToolButton(q)),
m_splitButton(new QToolButton(q)),
m_horizontalSplitAction(new QAction(Utils::Icons::SPLIT_HORIZONTAL.icon(),
EditorManager::tr("Split"), parent)),
Tr::tr("Split"), parent)),
m_verticalSplitAction(new QAction(Utils::Icons::SPLIT_VERTICAL.icon(),
EditorManager::tr("Split Side by Side"), parent)),
m_splitNewWindowAction(new QAction(EditorManager::tr("Open in New Window"), parent)),
Tr::tr("Split Side by Side"), parent)),
m_splitNewWindowAction(new QAction(Tr::tr("Open in New Window"), parent)),
m_closeSplitButton(new QToolButton(q)),
m_activeToolBar(nullptr),
m_toolBarPlaceholder(new QWidget(q)),
@@ -109,7 +110,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_lockButton->setEnabled(false);
d->m_dragHandle->setProperty("noArrow", true);
d->m_dragHandle->setToolTip(tr("Drag to drag documents between splits"));
d->m_dragHandle->setToolTip(Tr::tr("Drag to drag documents between splits"));
d->m_dragHandle->installEventFilter(this);
d->m_dragHandleMenu = new QMenu(d->m_dragHandle);
d->m_dragHandle->setMenu(d->m_dragHandleMenu);
@@ -138,7 +139,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_forwardButton->setDefaultAction(d->m_goForwardAction);
d->m_splitButton->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon());
d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setToolTip(Tr::tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup);
d->m_splitButton->setProperty("noArrow", true);
auto splitMenu = new QMenu(d->m_splitButton);
@@ -347,10 +348,10 @@ void EditorToolBar::setCanGoForward(bool canGoForward)
void EditorToolBar::updateActionShortcuts()
{
d->m_closeEditorButton->setToolTip(ActionManager::command(Constants::CLOSE)->stringWithAppendedShortcut(EditorManager::tr("Close Document")));
d->m_closeEditorButton->setToolTip(ActionManager::command(Constants::CLOSE)->stringWithAppendedShortcut(Tr::tr("Close Document")));
d->m_goBackAction->setToolTip(ActionManager::command(Constants::GO_BACK)->action()->toolTip());
d->m_goForwardAction->setToolTip(ActionManager::command(Constants::GO_FORWARD)->action()->toolTip());
d->m_closeSplitButton->setToolTip(ActionManager::command(Constants::REMOVE_CURRENT_SPLIT)->stringWithAppendedShortcut(tr("Remove Split")));
d->m_closeSplitButton->setToolTip(ActionManager::command(Constants::REMOVE_CURRENT_SPLIT)->stringWithAppendedShortcut(Tr::tr("Remove Split")));
}
void EditorToolBar::checkDocumentStatus(IDocument *document)
@@ -383,12 +384,12 @@ void EditorToolBar::updateDocumentStatus(IDocument *document)
const static QIcon locked = Utils::Icons::LOCKED_TOOLBAR.icon();
d->m_lockButton->setIcon(locked);
d->m_lockButton->setEnabled(true);
d->m_lockButton->setToolTip(tr("Make Writable"));
d->m_lockButton->setToolTip(Tr::tr("Make Writable"));
} else {
const static QIcon unlocked = Utils::Icons::UNLOCKED_TOOLBAR.icon();
d->m_lockButton->setIcon(unlocked);
d->m_lockButton->setEnabled(false);
d->m_lockButton->setToolTip(tr("File is writable"));
d->m_lockButton->setToolTip(Tr::tr("File is writable"));
}
if (document->filePath().isEmpty())

View File

@@ -2,14 +2,14 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "externaltool.h"
#include "externaltoolmanager.h"
#include "coreplugintr.h"
#include "externaltoolmanager.h"
#include "icore.h"
#include "idocument.h"
#include "messagemanager.h"
#include "documentmanager.h"
#include "editormanager/editormanager.h"
#include "editormanager/ieditor.h"
#include <app/app_version.h>
@@ -308,7 +308,7 @@ static void localizedText(const QStringList &locales, QXmlStreamReader *reader,
}
} else {
if (*currentLocale < 0 && currentText->isEmpty()) {
*currentText = QCoreApplication::translate("Core::ExternalTool",
*currentText = QCoreApplication::translate("::Core",
reader->readElementText().toUtf8().constData(),
"");
} else {
@@ -591,7 +591,7 @@ bool ExternalToolRunner::resolve()
if (m_resolvedExecutable.isEmpty()) {
m_hasError = true;
for (int i = 0; i < expandedExecutables.size(); ++i) {
m_errorString += tr("Could not find executable for \"%1\" (expanded \"%2\")")
m_errorString += Tr::tr("Could not find executable for \"%1\" (expanded \"%2\")")
.arg(m_tool->executables().at(i).toUserOutput(),
expandedExecutables.at(i).toUserOutput());
m_errorString += QLatin1Char('\n');
@@ -643,7 +643,7 @@ void ExternalToolRunner::run()
const auto write = m_tool->outputHandling() == ExternalTool::ShowInPane
? QOverload<const QString &>::of(MessageManager::writeDisrupting)
: QOverload<const QString &>::of(MessageManager::writeSilently);
write(tr("Starting external tool \"%1\"").arg(cmd.toUserOutput()));
write(Tr::tr("Starting external tool \"%1\"").arg(cmd.toUserOutput()));
if (!m_resolvedInput.isEmpty())
m_process->setWriteData(m_resolvedInput.toLocal8Bit());
m_process->start();
@@ -657,8 +657,8 @@ void ExternalToolRunner::done()
ExternalToolManager::emitReplaceSelectionRequested(m_processOutput);
}
const QString message = (m_process->result() == ProcessResult::FinishedWithSuccess)
? tr("\"%1\" finished").arg(m_resolvedExecutable.toUserOutput())
: tr("\"%1\" finished with error").arg(m_resolvedExecutable.toUserOutput());
? Tr::tr("\"%1\" finished").arg(m_resolvedExecutable.toUserOutput())
: Tr::tr("\"%1\" finished with error").arg(m_resolvedExecutable.toUserOutput());
if (m_tool->modifiesCurrentDocument())
DocumentManager::unexpectFileChange(m_expectedFilePath);

View File

@@ -2,8 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "externaltoolmanager.h"
#include "externaltool.h"
#include "coreconstants.h"
#include "coreplugintr.h"
#include "icontext.h"
#include "icore.h"
#include "messagemanager.h"
@@ -55,7 +57,7 @@ ExternalToolManager::ExternalToolManager()
// add the external tools menu
ActionContainer *mexternaltools = ActionManager::createMenu(Id(Constants::M_TOOLS_EXTERNAL));
mexternaltools->menu()->setTitle(ExternalToolManager::tr("&External"));
mexternaltools->menu()->setTitle(Tr::tr("&External"));
ActionContainer *mtools = ActionManager::actionContainer(Constants::M_TOOLS);
mtools->addMenu(mexternaltools, Constants::G_DEFAULT_THREE);
@@ -105,7 +107,7 @@ void ExternalToolManager::parseDirectory(const QString &directory,
QString error;
ExternalTool *tool = ExternalTool::createFromFile(Utils::FilePath::fromString(fileName), &error, ICore::userInterfaceLanguage());
if (!tool) {
qWarning() << ExternalTool::tr("Error while parsing external tool %1: %2").arg(fileName, error);
qWarning() << Tr::tr("Error while parsing external tool %1: %2").arg(fileName, error);
continue;
}
if (tools->contains(tool->id())) {
@@ -114,7 +116,7 @@ void ExternalToolManager::parseDirectory(const QString &directory,
ExternalTool *other = tools->value(tool->id());
other->setPreset(QSharedPointer<ExternalTool>(tool));
} else {
qWarning() << ExternalToolManager::tr("Error: External tool in %1 has duplicate id").arg(fileName);
qWarning() << Tr::tr("Error: External tool in %1 has duplicate id").arg(fileName);
delete tool;
}
continue;

View File

@@ -4,6 +4,7 @@
#include "fileutils.h"
#include "coreconstants.h"
#include "coreplugintr.h"
#include "documentmanager.h"
#include "editormanager/editormanager.h"
#include "foldernavigationwidget.h"
@@ -47,14 +48,11 @@ namespace Core {
// Show error with option to open settings.
static void showGraphicalShellError(QWidget *parent, const QString &app, const QString &error)
{
const QString title = QApplication::translate("Core::Internal",
"Launching a file browser failed");
const QString msg = QApplication::translate("Core::Internal",
"Unable to start the file manager:\n\n%1\n\n").arg(app);
const QString title = Tr::tr("Launching a file browser failed");
const QString msg = Tr::tr("Unable to start the file manager:\n\n%1\n\n").arg(app);
QMessageBox mbox(QMessageBox::Warning, title, msg, QMessageBox::Close, parent);
if (!error.isEmpty())
mbox.setDetailedText(QApplication::translate("Core::Internal",
"\"%1\" returned the following error:\n\n%2").arg(app, error));
mbox.setDetailedText(Tr::tr("\"%1\" returned the following error:\n\n%2").arg(app, error));
QAbstractButton *settingsButton = mbox.addButton(Core::ICore::msgShowOptionsDialog(),
QMessageBox::ActionRole);
mbox.exec();
@@ -70,10 +68,8 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
const FilePath explorer = Environment::systemEnvironment().searchInPath(QLatin1String("explorer.exe"));
if (explorer.isEmpty()) {
QMessageBox::warning(parent,
QApplication::translate("Core::Internal",
"Launching Windows Explorer Failed"),
QApplication::translate("Core::Internal",
"Could not find explorer.exe in path to launch Windows Explorer."));
Tr::tr("Launching Windows Explorer Failed"),
Tr::tr("Could not find explorer.exe in path to launch Windows Explorer."));
return;
}
QStringList param;
@@ -91,8 +87,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
UnixUtils::substituteFileBrowserParameters(app, folder));
QString error;
if (browserArgs.isEmpty()) {
error = QApplication::translate("Core::Internal",
"The command for file browser is not set.");
error = QApplication::translate("::Core", "The command for file browser is not set.");
} else {
QProcess browserProc;
browserProc.setProgram(browserArgs.takeFirst());
@@ -100,8 +95,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
const bool success = browserProc.startDetached();
error = QString::fromLocal8Bit(browserProc.readAllStandardError());
if (!success && error.isEmpty())
error = QApplication::translate("Core::Internal",
"Error while starting file browser.");
error = QApplication::translate("::Core", "Error while starting file browser.");
}
if (!error.isEmpty())
showGraphicalShellError(parent, app, error);
@@ -184,37 +178,37 @@ void FileUtils::openTerminal(const FilePath &path, const Environment &env)
QString FileUtils::msgFindInDirectory()
{
return QApplication::translate("Core::Internal", "Find in This Directory...");
return Tr::tr("Find in This Directory...");
}
QString FileUtils::msgFileSystemAction()
{
return QApplication::translate("Core::Internal", "Show in File System View");
return Tr::tr("Show in File System View");
}
QString FileUtils::msgGraphicalShellAction()
{
if (HostOsInfo::isWindowsHost())
return QApplication::translate("Core::Internal", "Show in Explorer");
return Tr::tr("Show in Explorer");
if (HostOsInfo::isMacHost())
return QApplication::translate("Core::Internal", "Show in Finder");
return QApplication::translate("Core::Internal", "Show Containing Folder");
return Tr::tr("Show in Finder");
return Tr::tr("Show Containing Folder");
}
QString FileUtils::msgTerminalHereAction()
{
if (HostOsInfo::isWindowsHost())
return QApplication::translate("Core::Internal", "Open Command Prompt Here");
return QApplication::translate("Core::Internal", "Open Terminal Here");
return Tr::tr("Open Command Prompt Here");
return Tr::tr("Open Terminal Here");
}
QString FileUtils::msgTerminalWithAction()
{
if (HostOsInfo::isWindowsHost())
return QApplication::translate("Core::Internal", "Open Command Prompt With",
"Opens a submenu for choosing an environment, such as \"Run Environment\"");
return QApplication::translate("Core::Internal", "Open Terminal With",
"Opens a submenu for choosing an environment, such as \"Run Environment\"");
return Tr::tr("Open Command Prompt With",
"Opens a submenu for choosing an environment, such as \"Run Environment\"");
return Tr::tr("Open Terminal With",
"Opens a submenu for choosing an environment, such as \"Run Environment\"");
}
void FileUtils::removeFiles(const FilePaths &filePaths, bool deleteFromFS)
@@ -232,8 +226,7 @@ void FileUtils::removeFiles(const FilePaths &filePaths, bool deleteFromFS)
continue;
if (!file.remove()) {
MessageManager::writeDisrupting(
QCoreApplication::translate("Core::Internal", "Failed to remove file \"%1\".")
.arg(fp.toUserOutput()));
Tr::tr("Failed to remove file \"%1\".").arg(fp.toUserOutput()));
}
}
}
@@ -270,8 +263,7 @@ void FileUtils::updateHeaderFileGuardIfApplicable(const Utils::FilePath &oldFile
if (headerUpdateSuccess)
return;
MessageManager::writeDisrupting(
QCoreApplication::translate("Core::FileUtils",
"Failed to rename the include guard in file \"%1\".")
Tr::tr("Failed to rename the include guard in file \"%1\".")
.arg(newFilePath.toUserOutput()));
}

View File

@@ -3,8 +3,9 @@
#include "currentdocumentfind.h"
#include "../coreplugintr.h"
#include <aggregation/aggregate.h>
#include <coreplugin/coreconstants.h>
#include <utils/fadingindicator.h>
#include <utils/qtcassert.h>
@@ -13,9 +14,7 @@
#include <QApplication>
#include <QWidget>
using namespace Core;
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
CurrentDocumentFind::CurrentDocumentFind()
: m_currentFind(nullptr)
@@ -128,7 +127,7 @@ int CurrentDocumentFind::replaceAll(const QString &before, const QString &after,
QTC_CHECK(m_currentWidget);
int count = m_currentFind->replaceAll(before, after, findFlags);
Utils::FadingIndicator::showText(m_currentWidget,
tr("%n occurrences replaced.", nullptr, count),
Tr::tr("%n occurrences replaced.", nullptr, count),
Utils::FadingIndicator::SmallText);
return count;
}
@@ -264,3 +263,5 @@ void CurrentDocumentFind::candidateAggregationChanged()
emit candidateChanged();
}
}
} // Core::Internal

View File

@@ -6,17 +6,15 @@
#include "currentdocumentfind.h"
#include "findtoolbar.h"
#include "findtoolwindow.h"
#include "searchresultwindow.h"
#include "ifindfilter.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreplugin.h>
#include "searchresultwindow.h"
#include "../actionmanager/actioncontainer.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include "../icontext.h"
#include "../icore.h"
#include <extensionsystem/pluginmanager.h>
@@ -155,8 +153,6 @@ void CompletionModel::updateCompletion(const QString &text, FindFlags f)
class FindPrivate : public QObject
{
Q_DECLARE_TR_FUNCTIONS(Core::Find)
public:
bool isAnyFilterEnabled() const;
void writeSettings();
@@ -266,7 +262,7 @@ void FindPrivate::setupMenu()
ActionContainer *medit = ActionManager::actionContainer(Constants::M_EDIT);
ActionContainer *mfind = ActionManager::createMenu(Constants::M_FIND);
medit->addMenu(mfind, Constants::G_EDIT_FIND);
mfind->menu()->setTitle(tr("&Find/Replace"));
mfind->menu()->setTitle(Tr::tr("&Find/Replace"));
mfind->appendGroup(Constants::G_FIND_CURRENTDOCUMENT);
mfind->appendGroup(Constants::G_FIND_FILTERS);
mfind->appendGroup(Constants::G_FIND_FLAGS);
@@ -276,12 +272,12 @@ void FindPrivate::setupMenu()
mfind->addSeparator(Constants::G_FIND_ACTIONS);
ActionContainer *mfindadvanced = ActionManager::createMenu(Constants::M_FIND_ADVANCED);
mfindadvanced->menu()->setTitle(tr("Advanced Find"));
mfindadvanced->menu()->setTitle(Tr::tr("Advanced Find"));
mfind->addMenu(mfindadvanced, Constants::G_FIND_FILTERS);
m_openFindDialog = new QAction(tr("Open Advanced Find..."), this);
m_openFindDialog->setIconText(tr("Advanced..."));
m_openFindDialog = new QAction(Tr::tr("Open Advanced Find..."), this);
m_openFindDialog->setIconText(Tr::tr("Advanced..."));
cmd = ActionManager::registerAction(m_openFindDialog, Constants::ADVANCED_FIND);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+F")));
mfindadvanced->addAction(cmd);
connect(m_openFindDialog, &QAction::triggered,
this, [] { Find::openFindDialog(nullptr); });

View File

@@ -6,15 +6,15 @@
#include "ifindfilter.h"
#include "findplugin.h"
#include "optionspopup.h"
#include <coreplugin/coreicons.h>
#include <coreplugin/coreplugin.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/findplaceholder.h>
#include "../actionmanager/actioncontainer.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../coreicons.h"
#include "../coreplugin.h"
#include "../coreplugintr.h"
#include "../findplaceholder.h"
#include "../icontext.h"
#include "../icore.h"
#include <utils/hostosinfo.h>
#include <utils/fancylineedit.h>
@@ -59,10 +59,10 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
m_findIncrementalTimer(this),
m_findStepTimer(this)
{
setWindowTitle(QCoreApplication::translate("Core::Internal::FindWidget", "Find", nullptr));
setWindowTitle(Tr::tr("Find", nullptr));
m_findLabel = new QLabel;
m_findLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Find:", nullptr));
m_findLabel->setText(Tr::tr("Find:", nullptr));
m_findEdit = new FancyLineEdit;
m_findEdit->setObjectName("findEdit");
@@ -98,7 +98,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
m_replaceEdit->setFiltering(true);
m_replaceLabel = new QLabel;
m_replaceLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace with:"));
m_replaceLabel->setText(Tr::tr("Replace with:"));
// compensate for a vertically expanding spacer below the label
m_replaceLabel->setMinimumHeight(m_replaceEdit->sizeHint().height());
@@ -106,21 +106,21 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
m_replaceButtonsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
m_replaceButton = new QToolButton;
m_replaceButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace"));
m_replaceButton->setText(Tr::tr("Replace"));
m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_replaceButton->setArrowType(Qt::LeftArrow);
m_replaceNextButton = new QToolButton;
m_replaceNextButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace && Find"));
m_replaceNextButton->setText(Tr::tr("Replace && Find"));
m_replaceNextButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_replaceNextButton->setArrowType(Qt::RightArrow);
m_replaceAllButton = new QToolButton;
m_replaceAllButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace All"));
m_replaceAllButton->setText(Tr::tr("Replace All"));
m_replaceAllButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_advancedButton = new QToolButton;
m_advancedButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Advanced..."));
m_advancedButton->setText(Tr::tr("Advanced..."));
m_advancedButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
auto replaceButtonsLayout = new QHBoxLayout(m_replaceButtonsWidget);
@@ -208,26 +208,26 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
this, &FindToolBar::findCompleterActivated);
auto shiftEnterAction = new QAction(m_findEdit);
shiftEnterAction->setShortcut(QKeySequence(tr("Shift+Enter")));
shiftEnterAction->setShortcut(QKeySequence(Tr::tr("Shift+Enter")));
shiftEnterAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftEnterAction, &QAction::triggered,
this, &FindToolBar::invokeFindPrevious);
m_findEdit->addAction(shiftEnterAction);
auto shiftReturnAction = new QAction(m_findEdit);
shiftReturnAction->setShortcut(QKeySequence(tr("Shift+Return")));
shiftReturnAction->setShortcut(QKeySequence(Tr::tr("Shift+Return")));
shiftReturnAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftReturnAction, &QAction::triggered,
this, &FindToolBar::invokeFindPrevious);
m_findEdit->addAction(shiftReturnAction);
auto shiftEnterReplaceAction = new QAction(m_replaceEdit);
shiftEnterReplaceAction->setShortcut(QKeySequence(tr("Shift+Enter")));
shiftEnterReplaceAction->setShortcut(QKeySequence(Tr::tr("Shift+Enter")));
shiftEnterReplaceAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftEnterReplaceAction, &QAction::triggered,
this, &FindToolBar::invokeReplacePrevious);
m_replaceEdit->addAction(shiftEnterReplaceAction);
auto shiftReturnReplaceAction = new QAction(m_replaceEdit);
shiftReturnReplaceAction->setShortcut(QKeySequence(tr("Shift+Return")));
shiftReturnReplaceAction->setShortcut(QKeySequence(Tr::tr("Shift+Return")));
shiftReturnReplaceAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftReturnReplaceAction, &QAction::triggered,
this, &FindToolBar::invokeReplacePrevious);
@@ -241,8 +241,8 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
ActionContainer *mfind = ActionManager::actionContainer(Constants::M_FIND);
Command *cmd;
auto advancedAction = new QAction(Find::tr("Open Advanced Find..."), this);
advancedAction->setIconText(Find::tr("Advanced..."));
auto advancedAction = new QAction(Tr::tr("Open Advanced Find..."), this);
advancedAction->setIconText(Tr::tr("Advanced..."));
Command *advancedCmd = ActionManager::command(Constants::ADVANCED_FIND);
if (advancedCmd)
advancedCmd->augmentActionWithShortcutToolTip(advancedAction);
@@ -258,7 +258,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
this, &FindToolBar::setFocusToCurrentFindSupport);
QIcon icon = QIcon::fromTheme(QLatin1String("edit-find-replace"));
m_findInDocumentAction = new QAction(icon, tr("Find/Replace"), this);
m_findInDocumentAction = new QAction(icon, Tr::tr("Find/Replace"), this);
cmd = ActionManager::registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT);
cmd->setDefaultKeySequence(QKeySequence::Find);
mfind->addAction(cmd, Constants::G_FIND_CURRENTDOCUMENT);
@@ -273,16 +273,16 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
});
if (QApplication::clipboard()->supportsFindBuffer()) {
m_enterFindStringAction = new QAction(tr("Enter Find String"), this);
m_enterFindStringAction = new QAction(Tr::tr("Enter Find String"), this);
cmd = ActionManager::registerAction(m_enterFindStringAction, "Find.EnterFindString");
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+E")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_enterFindStringAction, &QAction::triggered,
this, &FindToolBar::putSelectionToFindClipboard);
connect(QApplication::clipboard(), &QClipboard::findBufferChanged, this, &FindToolBar::updateFromFindClipboard);
}
m_findNextAction = new QAction(tr("Find Next"), this);
m_findNextAction = new QAction(Tr::tr("Find Next"), this);
cmd = ActionManager::registerAction(m_findNextAction, Constants::FIND_NEXT);
cmd->setDefaultKeySequence(QKeySequence::FindNext);
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
@@ -293,7 +293,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localFindNextAction, &QAction::triggered, this, &FindToolBar::invokeFindNext);
m_findNextButton->setDefaultAction(m_localFindNextAction);
m_findPreviousAction = new QAction(tr("Find Previous"), this);
m_findPreviousAction = new QAction(Tr::tr("Find Previous"), this);
cmd = ActionManager::registerAction(m_findPreviousAction, Constants::FIND_PREVIOUS);
cmd->setDefaultKeySequence(QKeySequence::FindPrevious);
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
@@ -304,22 +304,22 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localFindPreviousAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious);
m_findPreviousButton->setDefaultAction(m_localFindPreviousAction);
m_findNextSelectedAction = new QAction(tr("Find Next (Selected)"), this);
m_findNextSelectedAction = new QAction(Tr::tr("Find Next (Selected)"), this);
cmd = ActionManager::registerAction(m_findNextSelectedAction, Constants::FIND_NEXT_SELECTED);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+F3")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+F3")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_findNextSelectedAction, &QAction::triggered, this, &FindToolBar::findNextSelected);
m_findPreviousSelectedAction = new QAction(tr("Find Previous (Selected)"), this);
m_findPreviousSelectedAction = new QAction(Tr::tr("Find Previous (Selected)"), this);
cmd = ActionManager::registerAction(m_findPreviousSelectedAction, Constants::FIND_PREV_SELECTED);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F3")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+F3")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_findPreviousSelectedAction, &QAction::triggered,
this, &FindToolBar::findPreviousSelected);
m_selectAllAction = new QAction(tr("Select All"), this);
m_selectAllAction = new QAction(Tr::tr("Select All"), this);
cmd = ActionManager::registerAction(m_selectAllAction, Constants::FIND_SELECT_ALL);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Return")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+Return")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_selectAllAction, &QAction::triggered, this, &FindToolBar::selectAll);
m_localSelectAllAction = new QAction(m_selectAllAction->text(), this);
@@ -328,7 +328,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localSelectAllAction, &QAction::triggered, this, &FindToolBar::selectAll);
m_selectAllButton->setDefaultAction(m_localSelectAllAction);
m_replaceAction = new QAction(tr("Replace"), this);
m_replaceAction = new QAction(Tr::tr("Replace"), this);
cmd = ActionManager::registerAction(m_replaceAction, Constants::REPLACE);
cmd->setDefaultKeySequence(QKeySequence());
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
@@ -339,9 +339,9 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplace);
m_replaceButton->setDefaultAction(m_localReplaceAction);
m_replaceNextAction = new QAction(tr("Replace && Find"), this);
m_replaceNextAction = new QAction(Tr::tr("Replace && Find"), this);
cmd = ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+=")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+=")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_replaceNextAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplaceNext);
m_localReplaceNextAction = new QAction(m_replaceNextAction->text(), this);
@@ -351,7 +351,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext);
m_replaceNextButton->setDefaultAction(m_localReplaceNextAction);
m_replacePreviousAction = new QAction(tr("Replace && Find Previous"), this);
m_replacePreviousAction = new QAction(Tr::tr("Replace && Find Previous"), this);
cmd = ActionManager::registerAction(m_replacePreviousAction, Constants::REPLACE_PREVIOUS);
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_replacePreviousAction, &QAction::triggered,
@@ -362,7 +362,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localReplacePreviousAction, &QAction::triggered,
this, &FindToolBar::invokeReplacePrevious);
m_replaceAllAction = new QAction(tr("Replace All"), this);
m_replaceAllAction = new QAction(Tr::tr("Replace All"), this);
cmd = ActionManager::registerAction(m_replaceAllAction, Constants::REPLACE_ALL);
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_replaceAllAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplaceAll);
@@ -372,7 +372,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
connect(m_localReplaceAllAction, &QAction::triggered, this, &FindToolBar::invokeReplaceAll);
m_replaceAllButton->setDefaultAction(m_localReplaceAllAction);
m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this);
m_caseSensitiveAction = new QAction(Tr::tr("Case Sensitive"), this);
m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon());
m_caseSensitiveAction->setCheckable(true);
m_caseSensitiveAction->setChecked(false);
@@ -380,7 +380,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
mfind->addAction(cmd, Constants::G_FIND_FLAGS);
connect(m_caseSensitiveAction, &QAction::toggled, this, &FindToolBar::setCaseSensitive);
m_wholeWordAction = new QAction(tr("Whole Words Only"), this);
m_wholeWordAction = new QAction(Tr::tr("Whole Words Only"), this);
m_wholeWordAction->setIcon(Icons::FIND_WHOLE_WORD.icon());
m_wholeWordAction->setCheckable(true);
m_wholeWordAction->setChecked(false);
@@ -388,7 +388,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
mfind->addAction(cmd, Constants::G_FIND_FLAGS);
connect(m_wholeWordAction, &QAction::toggled, this, &FindToolBar::setWholeWord);
m_regularExpressionAction = new QAction(tr("Use Regular Expressions"), this);
m_regularExpressionAction = new QAction(Tr::tr("Use Regular Expressions"), this);
m_regularExpressionAction->setIcon(Icons::FIND_REGEXP.icon());
m_regularExpressionAction->setCheckable(true);
m_regularExpressionAction->setChecked(false);
@@ -396,7 +396,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
mfind->addAction(cmd, Constants::G_FIND_FLAGS);
connect(m_regularExpressionAction, &QAction::toggled, this, &FindToolBar::setRegularExpressions);
m_preserveCaseAction = new QAction(tr("Preserve Case when Replacing"), this);
m_preserveCaseAction = new QAction(Tr::tr("Preserve Case when Replacing"), this);
m_preserveCaseAction->setIcon(Icons::FIND_PRESERVE_CASE.icon());
m_preserveCaseAction->setCheckable(true);
m_preserveCaseAction->setChecked(false);
@@ -527,7 +527,7 @@ void FindToolBar::updateToolBar()
m_findLabel->setEnabled(enabled);
m_findLabel->setVisible(showAllControls);
m_findEdit->setEnabled(enabled);
m_findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for..."));
m_findEdit->setPlaceholderText(showAllControls ? QString() : Tr::tr("Search for..."));
m_findPreviousButton->setEnabled(enabled);
m_findPreviousButton->setVisible(showAllControls);
m_findNextButton->setEnabled(enabled);
@@ -541,7 +541,7 @@ void FindToolBar::updateToolBar()
m_replaceLabel->setEnabled(replaceEnabled);
m_replaceLabel->setVisible(replaceEnabled && showAllControls);
m_replaceEdit->setEnabled(replaceEnabled);
m_replaceEdit->setPlaceholderText(showAllControls ? QString() : tr("Replace with..."));
m_replaceEdit->setPlaceholderText(showAllControls ? QString() : Tr::tr("Replace with..."));
m_replaceEdit->setVisible(replaceEnabled);
m_replaceButtonsWidget->setVisible(replaceEnabled && showAllControls);
m_advancedButton->setVisible(replaceEnabled && showAllControls);

View File

@@ -5,8 +5,8 @@
#include "ifindfilter.h"
#include "findplugin.h"
#include <coreplugin/icore.h>
#include "../coreplugintr.h"
#include "../icore.h"
#include <utils/algorithm.h>
#include <utils/fancylineedit.h>
@@ -16,7 +16,6 @@
#include <QCheckBox>
#include <QComboBox>
#include <QCompleter>
#include <QCoreApplication>
#include <QKeyEvent>
#include <QLabel>
#include <QLayout>
@@ -36,7 +35,7 @@ static bool validateRegExp(Utils::FancyLineEdit *edit, QString *errorMessage)
{
if (edit->text().isEmpty()) {
if (errorMessage)
*errorMessage = FindToolWindow::tr("Empty search term.");
*errorMessage = Tr::tr("Empty search term.");
return false;
}
if (Find::hasFindFlag(FindRegularExpression)) {
@@ -58,17 +57,17 @@ FindToolWindow::FindToolWindow(QWidget *parent)
m_instance = this;
m_searchButton = new QPushButton(this);
m_searchButton->setText(QCoreApplication::translate("Core::Internal::FindDialog", "&Search", nullptr));
m_searchButton->setText(Tr::tr("&Search", nullptr));
m_searchButton->setDefault(true);
m_replaceButton = new QPushButton(this);
m_replaceButton->setText(QCoreApplication::translate("Core::Internal::FindDialog", "Search && &Replace", nullptr));
m_replaceButton->setText(Tr::tr("Search && &Replace", nullptr));
m_searchTerm = new FancyLineEdit(this);
m_searchTerm->setFiltering(true);
m_searchLabel = new QLabel(this);
m_searchLabel->setText(QCoreApplication::translate("Core::Internal::FindDialog", "Search f&or:", nullptr));
m_searchLabel->setText(Tr::tr("Search f&or:", nullptr));
m_searchLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
m_searchLabel->setBuddy(m_searchTerm);
@@ -79,16 +78,16 @@ FindToolWindow::FindToolWindow(QWidget *parent)
m_optionsWidget = new QWidget(this);
m_matchCase = new QCheckBox(m_optionsWidget);
m_matchCase->setText(QCoreApplication::translate("Core::Internal::FindDialog", "&Case sensitive", nullptr));
m_matchCase->setText(Tr::tr("&Case sensitive", nullptr));
m_wholeWords = new QCheckBox(m_optionsWidget);
m_wholeWords->setText(QCoreApplication::translate("Core::Internal::FindDialog", "Whole words o&nly", nullptr));
m_wholeWords->setText(Tr::tr("Whole words o&nly", nullptr));
m_regExp = new QCheckBox(m_optionsWidget);
m_regExp->setText(QCoreApplication::translate("Core::Internal::FindDialog", "Use re&gular expressions", nullptr));
m_regExp->setText(Tr::tr("Use re&gular expressions", nullptr));
auto label = new QLabel(this);
label->setText(QCoreApplication::translate("Core::Internal::FindDialog", "Sco&pe:", nullptr));
label->setText(Tr::tr("Sco&pe:", nullptr));
label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
label->setMinimumSize(QSize(80, 0));
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);

View File

@@ -3,7 +3,8 @@
#include "ifindfilter.h"
#include <coreplugin/coreicons.h>
#include "../coreicons.h"
#include "../coreplugintr.h"
#include <QApplication>
#include <QKeySequence>
@@ -315,18 +316,18 @@ QString IFindFilter::descriptionForFindFlags(FindFlags flags)
{
QStringList flagStrings;
if (flags & FindCaseSensitively)
flagStrings.append(tr("Case sensitive"));
flagStrings.append(Tr::tr("Case sensitive"));
if (flags & FindWholeWords)
flagStrings.append(tr("Whole words"));
flagStrings.append(Tr::tr("Whole words"));
if (flags & FindRegularExpression)
flagStrings.append(tr("Regular expressions"));
flagStrings.append(Tr::tr("Regular expressions"));
if (flags & FindPreserveCase)
flagStrings.append(tr("Preserve case"));
QString description = tr("Flags: %1");
flagStrings.append(Tr::tr("Preserve case"));
QString description = Tr::tr("Flags: %1");
if (flagStrings.isEmpty())
description = description.arg(tr("None"));
description = description.arg(Tr::tr("None"));
else
description = description.arg(flagStrings.join(tr(", ")));
description = description.arg(flagStrings.join(Tr::tr(", ")));
return description;
}

View File

@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "searchresultwidget.h"
#include "searchresulttreeview.h"
#include "searchresulttreemodel.h"
#include "searchresulttreeitems.h"
@@ -9,15 +10,14 @@
#include "findplugin.h"
#include "itemviewfind.h"
#include "../coreplugintr.h"
#include <aggregation/aggregate.h>
#include <coreplugin/coreplugin.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <utils/fancylineedit.h>
#include <QDir>
#include <QFrame>
#include <QLabel>
#include <QLineEdit>
@@ -139,29 +139,29 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
descriptionLayout->addWidget(m_label);
descriptionLayout->addWidget(m_searchTerm);
m_cancelButton = new QToolButton(topFindWidget);
m_cancelButton->setText(tr("Cancel"));
m_cancelButton->setText(Tr::tr("Cancel"));
m_cancelButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
connect(m_cancelButton, &QAbstractButton::clicked, this, &SearchResultWidget::cancel);
m_searchAgainButton = new QToolButton(topFindWidget);
m_searchAgainButton->setToolTip(tr("Repeat the search with same parameters."));
m_searchAgainButton->setText(tr("&Search Again"));
m_searchAgainButton->setToolTip(Tr::tr("Repeat the search with same parameters."));
m_searchAgainButton->setText(Tr::tr("&Search Again"));
m_searchAgainButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_searchAgainButton->setVisible(false);
connect(m_searchAgainButton, &QAbstractButton::clicked, this, &SearchResultWidget::searchAgain);
m_replaceLabel = new QLabel(tr("Repla&ce with:"), m_topReplaceWidget);
m_replaceLabel = new QLabel(Tr::tr("Repla&ce with:"), m_topReplaceWidget);
m_replaceTextEdit = new WideEnoughLineEdit(m_topReplaceWidget);
m_replaceLabel->setBuddy(m_replaceTextEdit);
m_replaceTextEdit->setMinimumWidth(120);
setTabOrder(m_replaceTextEdit, m_searchResultTreeView);
m_preserveCaseCheck = new QCheckBox(m_topReplaceWidget);
m_preserveCaseCheck->setText(tr("Preser&ve case"));
m_preserveCaseCheck->setText(Tr::tr("Preser&ve case"));
m_preserveCaseCheck->setEnabled(false);
m_additionalReplaceWidget = new QWidget(m_topReplaceWidget);
m_additionalReplaceWidget->setVisible(false);
m_replaceButton = new QToolButton(m_topReplaceWidget);
m_replaceButton->setToolTip(tr("Replace all occurrences."));
m_replaceButton->setText(tr("&Replace"));
m_replaceButton->setToolTip(Tr::tr("Replace all occurrences."));
m_replaceButton->setText(Tr::tr("&Replace"));
m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_replaceButton->setEnabled(false);
@@ -234,7 +234,7 @@ void SearchResultWidget::addResults(const QList<SearchResultItem> &items, Search
if (!m_dontAskAgainGroup.isEmpty()) {
Id undoWarningId = Id("warninglabel/").withSuffix(m_dontAskAgainGroup);
if (m_infoBar.canInfoBeAdded(undoWarningId)) {
InfoBarEntry info(undoWarningId, tr("This change cannot be undone."),
InfoBarEntry info(undoWarningId, Tr::tr("This change cannot be undone."),
InfoBarEntry::GlobalSuppression::Enabled);
m_infoBar.addInfo(info);
}
@@ -252,10 +252,10 @@ void SearchResultWidget::addResults(const QList<SearchResultItem> &items, Search
return;
emit paused(true);
InfoBarEntry info(sizeWarningId,
tr("The search resulted in more than %n items, do you still want to continue?",
Tr::tr("The search resulted in more than %n items, do you still want to continue?",
nullptr, SEARCHRESULT_WARNING_LIMIT));
info.setCancelButtonInfo(tr("Cancel"), [this] { cancelAfterSizeWarning(); });
info.addCustomButton(tr("Continue"), [this] { continueAfterSizeWarning(); });
info.setCancelButtonInfo(Tr::tr("Cancel"), [this] { cancelAfterSizeWarning(); });
info.addCustomButton(Tr::tr("Continue"), [this] { continueAfterSizeWarning(); });
m_infoBar.addInfo(info);
emit requestPopup(false/*no focus*/);
}
@@ -434,7 +434,7 @@ void SearchResultWidget::finishSearch(bool canceled, const QString &reason)
m_preserveCaseCheck->setEnabled(m_count > 0);
m_cancelButton->setVisible(false);
if (canceled)
m_messageLabel->setText(reason.isEmpty() ? tr("Search was canceled.") : reason);
m_messageLabel->setText(reason.isEmpty() ? Tr::tr("Search was canceled.") : reason);
m_messageWidget->setVisible(canceled);
m_searchAgainButton->setVisible(m_searchAgainSupported);
m_searching = false;
@@ -512,11 +512,11 @@ QList<SearchResultItem> SearchResultWidget::checkedItems() const
void SearchResultWidget::updateMatchesFoundLabel()
{
if (m_count > 0) {
m_matchesFoundLabel->setText(tr("%n matches found.", nullptr, m_count));
m_matchesFoundLabel->setText(Tr::tr("%n matches found.", nullptr, m_count));
} else if (m_searching) {
m_matchesFoundLabel->setText(tr("Searching..."));
m_matchesFoundLabel->setText(Tr::tr("Searching..."));
} else {
m_matchesFoundLabel->setText(tr("No matches found."));
m_matchesFoundLabel->setText(Tr::tr("No matches found."));
}
}

View File

@@ -2,13 +2,15 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "searchresultwindow.h"
#include "searchresultwidget.h"
#include "textfindconstants.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../coreplugintr.h"
#include "../icontext.h"
#include "../icore.h"
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/icontext.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
#include <utils/utilsicons.h>
@@ -78,7 +80,6 @@ namespace Internal {
class SearchResultWindowPrivate : public QObject
{
Q_DECLARE_TR_FUNCTIONS(Core::SearchResultWindow)
public:
SearchResultWindowPrivate(SearchResultWindow *window, QWidget *newSearchPanel);
bool isSearchVisible() const { return m_currentIndex > 0; }
@@ -116,7 +117,7 @@ namespace Internal {
SearchResultWindowPrivate::SearchResultWindowPrivate(SearchResultWindow *window, QWidget *nsp) :
q(window),
m_expandCollapseButton(nullptr),
m_expandCollapseAction(new QAction(tr("Expand All"), window)),
m_expandCollapseAction(new QAction(Tr::tr("Expand All"), window)),
m_spacer(new QWidget),
m_spacer2(new QWidget),
m_widget(new QStackedWidget),
@@ -143,11 +144,11 @@ namespace Internal {
m_expandCollapseButton->setDefaultAction(cmd->action());
m_filterButton = new QToolButton(m_widget);
m_filterButton->setText(tr("Filter Results"));
m_filterButton->setText(Tr::tr("Filter Results"));
m_filterButton->setIcon(Utils::Icons::FILTER.icon());
m_filterButton->setEnabled(false);
QAction *newSearchAction = new QAction(tr("New Search"), this);
QAction *newSearchAction = new QAction(Tr::tr("New Search"), this);
newSearchAction->setIcon(Utils::Icons::NEWSEARCH_TOOLBAR.icon());
cmd = ActionManager::command(Constants::ADVANCED_FIND);
m_newSearchButton = Command::toolButtonWithAppendedShortcut(newSearchAction, cmd);
@@ -478,7 +479,7 @@ SearchResult *SearchResultWindow::startNewSearch(const QString &label,
delete d->m_searchResults.takeLast();
d->m_recentSearchesBox->removeItem(d->m_recentSearchesBox->count() - 1);
}
d->m_recentSearchesBox->insertItem(1, tr("%1 %2").arg(label, searchTerm));
d->m_recentSearchesBox->insertItem(1, Tr::tr("%1 %2").arg(label, searchTerm));
}
auto widget = new SearchResultWidget;
connect(widget, &SearchResultWidget::filterInvalidated, this, [this, widget] {
@@ -601,10 +602,10 @@ void SearchResultWindowPrivate::handleExpandCollapseToolButton(bool checked)
return;
m_searchResultWidgets.at(visibleSearchIndex())->setAutoExpandResults(checked);
if (checked) {
m_expandCollapseAction->setText(tr("Collapse All"));
m_expandCollapseAction->setText(Tr::tr("Collapse All"));
m_searchResultWidgets.at(visibleSearchIndex())->expandAll();
} else {
m_expandCollapseAction->setText(tr("Expand All"));
m_expandCollapseAction->setText(Tr::tr("Expand All"));
m_searchResultWidgets.at(visibleSearchIndex())->collapseAll();
}
}
@@ -618,12 +619,12 @@ void SearchResultWindowPrivate::updateFilterButton()
QList<QWidget *> SearchResultWindowPrivate::toolBarWidgets()
{
if (!m_historyLabel)
m_historyLabel = new QLabel(tr("History:"));
m_historyLabel = new QLabel(Tr::tr("History:"));
if (!m_recentSearchesBox) {
m_recentSearchesBox = new QComboBox;
m_recentSearchesBox->setProperty("drawleftborder", true);
m_recentSearchesBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
m_recentSearchesBox->addItem(tr("New Search"));
m_recentSearchesBox->addItem(Tr::tr("New Search"));
connect(m_recentSearchesBox, &QComboBox::activated,
this, &SearchResultWindowPrivate::setCurrentIndexWithFocus);
}
@@ -715,6 +716,14 @@ bool SearchResultWindow::canNavigate() const
return true;
}
/*!
\internal
*/
QString SearchResultWindow::displayName() const
{
return Tr::tr("Search Results");
}
/*!
\internal
*/

View File

@@ -100,7 +100,6 @@ public:
PreserveCaseDisabled
};
SearchResultWindow(QWidget *newSearchPanel);
~SearchResultWindow() override;
static SearchResultWindow *instance();
@@ -108,7 +107,7 @@ public:
QWidget *outputWidget(QWidget *) override;
QList<QWidget*> toolBarWidgets() const override;
QString displayName() const override { return tr("Search Results"); }
QString displayName() const override;
int priorityInStatusBar() const override;
void visibilityChanged(bool visible) override;
bool hasFocus() const override;

View File

@@ -3,18 +3,19 @@
#include "foldernavigationwidget.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/diffservice.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/iwizardfactory.h>
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "coreicons.h"
#include "coreplugintr.h"
#include "diffservice.h"
#include "documentmanager.h"
#include "editormanager/editormanager.h"
#include "editormanager/ieditor.h"
#include "fileutils.h"
#include "icontext.h"
#include "icore.h"
#include "idocument.h"
#include "iwizardfactory.h"
#include <extensionsystem/pluginmanager.h>
@@ -250,9 +251,9 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
m_listView(new Utils::NavigationTreeView(this)),
m_fileSystemModel(new FolderNavigationModel(this)),
m_sortProxyModel(new FolderSortProxyModel(m_fileSystemModel)),
m_filterHiddenFilesAction(new QAction(tr("Show Hidden Files"), this)),
m_showBreadCrumbsAction(new QAction(tr("Show Bread Crumbs"), this)),
m_showFoldersOnTopAction(new QAction(tr("Show Folders on Top"), this)),
m_filterHiddenFilesAction(new QAction(Tr::tr("Show Hidden Files"), this)),
m_showBreadCrumbsAction(new QAction(Tr::tr("Show Bread Crumbs"), this)),
m_showFoldersOnTopAction(new QAction(Tr::tr("Show Folders on Top"), this)),
m_toggleSync(new QToolButton(this)),
m_toggleRootSync(new QToolButton(this)),
m_rootSelector(new QComboBox),
@@ -323,11 +324,11 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
m_toggleSync->setIcon(Utils::Icons::LINK_TOOLBAR.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
m_toggleSync->setToolTip(Tr::tr("Synchronize with Editor"));
m_toggleRootSync->setIcon(Utils::Icons::LINK.icon());
m_toggleRootSync->setCheckable(true);
m_toggleRootSync->setToolTip(tr("Synchronize Root Directory with Editor"));
m_toggleRootSync->setToolTip(Tr::tr("Synchronize Root Directory with Editor"));
selectorLayout->addWidget(m_toggleRootSync);
// connections
@@ -469,7 +470,7 @@ void FolderNavigationWidget::addNewItem()
return;
const auto filePath = Utils::FilePath::fromString(m_fileSystemModel->filePath(current));
const Utils::FilePath path = filePath.isDir() ? filePath : filePath.parentDir();
Core::ICore::showNewItemDialog(tr("New File", "Title of dialog"),
Core::ICore::showNewItemDialog(Tr::tr("New File", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
Utils::equal(&Core::IWizardFactory::kind,
Core::IWizardFactory::FileWizard)),
@@ -623,7 +624,7 @@ void FolderNavigationWidget::openItem(const QModelIndex &index)
void FolderNavigationWidget::createNewFolder(const QModelIndex &parent)
{
static const QString baseName = tr("New Folder");
static const QString baseName = Tr::tr("New Folder");
// find non-existing name
const QDir dir(m_fileSystemModel->filePath(parent));
const QSet<Utils::FilePath> existingItems
@@ -685,7 +686,7 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
: Utils::FilePath();
if (hasCurrentItem) {
if (!isDir)
actionOpenFile = menu.addAction(tr("Open \"%1\"").arg(filePath.toUserOutput()));
actionOpenFile = menu.addAction(Tr::tr("Open \"%1\"").arg(filePath.toUserOutput()));
emit m_instance->aboutToShowContextMenu(&menu, filePath, isDir);
}
@@ -703,13 +704,13 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
menu.addAction(Core::ActionManager::command(REMOVEFILE)->action());
if (m_fileSystemModel->flags(current) & Qt::ItemIsEditable)
menu.addAction(Core::ActionManager::command(RENAMEFILE)->action());
newFolder = menu.addAction(tr("New Folder"));
newFolder = menu.addAction(Tr::tr("New Folder"));
if (isDir)
removeFolder = menu.addAction(tr("Remove Folder"));
removeFolder = menu.addAction(Tr::tr("Remove Folder"));
}
menu.addSeparator();
QAction *const collapseAllAction = menu.addAction(tr("Collapse All"));
QAction *const collapseAllAction = menu.addAction(Tr::tr("Collapse All"));
QAction *action = menu.exec(ev->globalPos());
if (!action)
@@ -730,7 +731,7 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
QString errorMessage;
filePath.removeRecursively(&errorMessage);
if (!errorMessage.isEmpty())
QMessageBox::critical(ICore::dialogParent(), tr("Error"), errorMessage);
QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"), errorMessage);
}
} else if (action == collapseAllAction) {
m_listView->collapseAll();
@@ -772,19 +773,19 @@ bool FolderNavigationWidget::isShowingFoldersOnTop() const
FolderNavigationWidgetFactory::FolderNavigationWidgetFactory()
{
m_instance = this;
setDisplayName(tr("File System"));
setDisplayName(Tr::tr("File System"));
setPriority(400);
setId("File System");
setActivationSequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+Y,Meta+F")
: tr("Alt+Y,Alt+F")));
setActivationSequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+Y,Meta+F")
: Tr::tr("Alt+Y,Alt+F")));
insertRootDirectory({QLatin1String("A.Computer"),
0 /*sortValue*/,
FolderNavigationWidget::tr("Computer"),
Tr::tr("Computer"),
Utils::FilePath(),
Core::Icons::DESKTOP_DEVICE_SMALL.icon()});
insertRootDirectory({QLatin1String("A.Home"),
10 /*sortValue*/,
FolderNavigationWidget::tr("Home"),
Tr::tr("Home"),
Utils::FilePath::fromString(QDir::homePath()),
Utils::Icons::HOME.icon()});
updateProjectsDirectoryRoot();
@@ -815,7 +816,7 @@ Core::NavigationView FolderNavigationWidgetFactory::createWidget()
n.widget = fnw;
auto filter = new QToolButton;
filter->setIcon(Utils::Icons::FILTER.icon());
filter->setToolTip(tr("Options"));
filter->setToolTip(Tr::tr("Options"));
filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true);
auto filterMenu = new QMenu(filter);
@@ -903,7 +904,7 @@ void FolderNavigationWidgetFactory::updateProjectsDirectoryRoot()
{
insertRootDirectory({QLatin1String(PROJECTSDIRECTORYROOT_ID),
20 /*sortValue*/,
FolderNavigationWidget::tr("Projects"),
Tr::tr("Projects"),
Core::DocumentManager::projectsDirectory(),
Utils::Icons::PROJECT.icon()});
}
@@ -928,21 +929,21 @@ void FolderNavigationWidgetFactory::registerActions()
{
Core::Context context(C_FOLDERNAVIGATIONWIDGET);
auto add = new QAction(tr("Add New..."), this);
auto add = new QAction(Tr::tr("Add New..."), this);
Core::ActionManager::registerAction(add, ADDNEWFILE, context);
connect(add, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())
navWidget->addNewItem();
});
auto rename = new QAction(tr("Rename..."), this);
auto rename = new QAction(Tr::tr("Rename..."), this);
Core::ActionManager::registerAction(rename, RENAMEFILE, context);
connect(rename, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())
navWidget->editCurrentItem();
});
auto remove = new QAction(tr("Remove..."), this);
auto remove = new QAction(Tr::tr("Remove..."), this);
Core::ActionManager::registerAction(remove, REMOVEFILE, context);
connect(remove, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())

View File

@@ -41,7 +41,6 @@ const char settingsKeyCodecForLocale[] = "General/OverrideCodecForLocale";
class GeneralSettingsWidget final : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::GeneralSettings)
public:
explicit GeneralSettingsWidget(GeneralSettings *q);
@@ -87,37 +86,37 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
m_colorButton->setMinimumSize(QSize(64, 0));
m_colorButton->setProperty("alphaAllowed", QVariant(false));
m_resetWarningsButton->setText(tr("Reset Warnings", "Button text"));
m_resetWarningsButton->setText(Tr::tr("Reset Warnings", "Button text"));
m_resetWarningsButton->setToolTip(
tr("Re-enable warnings that were suppressed by selecting \"Do Not "
Tr::tr("Re-enable warnings that were suppressed by selecting \"Do Not "
"Show Again\" (for example, missing highlighter).",
nullptr));
auto resetColorButton = new QPushButton(tr("Reset"));
resetColorButton->setToolTip(tr("Reset to default.", "Color"));
auto resetColorButton = new QPushButton(Tr::tr("Reset"));
resetColorButton->setToolTip(Tr::tr("Reset to default.", "Color"));
Form form;
form.addRow({tr("Color:"), m_colorButton, resetColorButton, st});
form.addRow({tr("Theme:"), m_themeChooser});
form.addRow({tr("Language:"), m_languageBox, st});
form.addRow({Tr::tr("Color:"), m_colorButton, resetColorButton, st});
form.addRow({Tr::tr("Theme:"), m_themeChooser});
form.addRow({Tr::tr("Language:"), m_languageBox, st});
if (!Utils::HostOsInfo::isMacHost()) {
auto dpiCheckbox = new QCheckBox(tr("Enable high DPI scaling"));
auto dpiCheckbox = new QCheckBox(Tr::tr("Enable high DPI scaling"));
form.addRow({empty, dpiCheckbox});
const bool defaultValue = Utils::HostOsInfo::isWindowsHost();
dpiCheckbox->setChecked(ICore::settings()->value(settingsKeyDPI, defaultValue).toBool());
connect(dpiCheckbox, &QCheckBox::toggled, this, [defaultValue](bool checked) {
ICore::settings()->setValueWithDefault(settingsKeyDPI, checked, defaultValue);
QMessageBox::information(ICore::dialogParent(),
tr("Restart Required"),
tr("The high DPI settings will take effect after restart."));
Tr::tr("Restart Required"),
Tr::tr("The high DPI settings will take effect after restart."));
});
}
form.addRow({empty, m_showShortcutsInContextMenus});
form.addRow(Row{m_resetWarningsButton, st});
form.addRow({tr("Text codec for tools:"), m_codecBox, st});
Column{Group{title(tr("User Interface")), form}}.attachTo(this);
form.addRow({Tr::tr("Text codec for tools:"), m_codecBox, st});
Column{Group{title(Tr::tr("User Interface")), form}}.attachTo(this);
fillLanguageBox();
fillCodecBox();
@@ -126,7 +125,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
m_resetWarningsButton->setEnabled(canResetWarnings());
m_showShortcutsInContextMenus->setText(
tr("Show keyboard shortcuts in context menus (default: %1)")
Tr::tr("Show keyboard shortcuts in context menus (default: %1)")
.arg(q->m_defaultShowShortcutsInContextMenu ? Tr::tr("on") : Tr::tr("off")));
m_showShortcutsInContextMenus->setChecked(GeneralSettings::showShortcutsInContextMenu());
@@ -152,7 +151,7 @@ void GeneralSettingsWidget::fillLanguageBox() const
{
const QString currentLocale = language();
m_languageBox->addItem(tr("<System Language>"), QString());
m_languageBox->addItem(Tr::tr("<System Language>"), QString());
// need to add this explicitly, since there is no qm file for English
m_languageBox->addItem(QLatin1String("English"), QLatin1String("C"));
if (currentLocale == QLatin1String("C"))
@@ -234,7 +233,7 @@ void GeneralSettingsWidget::setLanguage(const QString &locale)
QtcSettings *settings = ICore::settings();
if (settings->value(QLatin1String("General/OverrideLanguage")).toString() != locale) {
RestartDialog dialog(ICore::dialogParent(),
tr("The language change will take effect after restart."));
Tr::tr("The language change will take effect after restart."));
dialog.exec();
}
@@ -280,7 +279,7 @@ void GeneralSettings::setShowShortcutsInContextMenu(bool show)
GeneralSettings::GeneralSettings()
{
setId(Constants::SETTINGS_ID_INTERFACE);
setDisplayName(GeneralSettingsWidget::tr("Interface"));
setDisplayName(Tr::tr("Interface"));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(Tr::tr("Environment"));
setCategoryIconPath(":/core/images/settingscategory_core.png");

View File

@@ -3,7 +3,8 @@
#include "generatedfile.h"
#include <coreplugin/editormanager/editormanager.h>
#include "coreplugintr.h"
#include "editormanager/editormanager.h"
#include <utils/fileutils.h>
#include <utils/textfileformat.h>
@@ -138,8 +139,7 @@ bool GeneratedFile::write(QString *errorMessage) const
const FilePath parentDir = m_d->path.parentDir();
if (!parentDir.isDir()) {
if (!parentDir.createDir()) {
*errorMessage = QCoreApplication::translate("BaseFileWizard",
"Unable to create the directory %1.")
*errorMessage = Tr::tr("Unable to create the directory %1.")
.arg(parentDir.toUserOutput());
return false;
}

View File

@@ -620,10 +620,10 @@ QString ICore::versionString()
{
QString ideVersionDescription;
if (QLatin1String(Constants::IDE_VERSION_LONG) != QLatin1String(Constants::IDE_VERSION_DISPLAY))
ideVersionDescription = tr(" (%1)").arg(QLatin1String(Constants::IDE_VERSION_LONG));
return tr("%1 %2%3").arg(QLatin1String(Constants::IDE_DISPLAY_NAME),
QLatin1String(Constants::IDE_VERSION_DISPLAY),
ideVersionDescription);
ideVersionDescription = Tr::tr(" (%1)").arg(QLatin1String(Constants::IDE_VERSION_LONG));
return Tr::tr("%1 %2%3").arg(QLatin1String(Constants::IDE_DISPLAY_NAME),
QLatin1String(Constants::IDE_VERSION_DISPLAY),
ideVersionDescription);
}
/*!
@@ -631,7 +631,7 @@ QString ICore::versionString()
*/
QString ICore::buildCompatibilityString()
{
return tr("Based on Qt %1 (%2, %3)").arg(QLatin1String(qVersion()),
return Tr::tr("Based on Qt %1 (%2, %3)").arg(QLatin1String(qVersion()),
compilerString(),
QSysInfo::buildCpuArchitecture());
}

View File

@@ -3,6 +3,8 @@
#include "idocument.h"
#include "coreplugintr.h"
#include <utils/filepath.h>
#include <utils/infobar.h>
#include <utils/minimizableinfobars.h>
@@ -613,7 +615,7 @@ void IDocument::setRestoredFrom(const Utils::FilePath &path)
d->autoSavePath = path;
d->restored = true;
Utils::InfoBarEntry info(Id(kRestoredAutoSave),
tr("File was restored from auto-saved copy. "
Tr::tr("File was restored from auto-saved copy. "
"Select Save to confirm or Revert to Saved to discard changes."));
infoBar()->addInfo(info);
}

View File

@@ -2,6 +2,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "iversioncontrol.h"
#include "coreplugintr.h"
#include "vcsmanager.h"
#include <utils/algorithm.h>
@@ -53,7 +55,7 @@ namespace Core {
QString IVersionControl::vcsOpenText() const
{
return tr("Open with VCS (%1)").arg(displayName());
return Tr::tr("Open with VCS (%1)").arg(displayName());
}
QString IVersionControl::vcsMakeWritableText() const

View File

@@ -4,6 +4,7 @@
#include "iwizardfactory.h"
#include "actionmanager/actionmanager.h"
#include "coreplugintr.h"
#include "documentmanager.h"
#include "icore.h"
#include "featureprovider.h"
@@ -182,7 +183,7 @@ QList<IWizardFactory*> IWizardFactory::allWizardFactories()
QTC_ASSERT(existingFactory != newFactory, continue);
if (existingFactory) {
qWarning("%s", qPrintable(tr("Factory with id=\"%1\" already registered. Deleting.")
qWarning("%s", qPrintable(Tr::tr("Factory with id=\"%1\" already registered. Deleting.")
.arg(existingFactory->id().toString())));
delete newFactory;
continue;
@@ -400,14 +401,14 @@ void IWizardFactory::initialize()
{
connect(ICore::instance(), &ICore::coreAboutToClose, &IWizardFactory::clearWizardFactories);
auto resetAction = new QAction(tr("Reload All Wizards"), ActionManager::instance());
auto resetAction = new QAction(Tr::tr("Reload All Wizards"), ActionManager::instance());
ActionManager::registerAction(resetAction, "Wizard.Factory.Reset");
connect(resetAction, &QAction::triggered, &IWizardFactory::clearWizardFactories);
connect(ICore::instance(), &ICore::newItemDialogStateChanged, resetAction,
[resetAction] { resetAction->setEnabled(!ICore::isNewItemDialogRunning()); });
s_inspectWizardAction = new QAction(tr("Inspect Wizard State"), ActionManager::instance());
s_inspectWizardAction = new QAction(Tr::tr("Inspect Wizard State"), ActionManager::instance());
ActionManager::registerAction(s_inspectWizardAction, "Wizard.Inspect");
}

View File

@@ -4,11 +4,11 @@
#include "jsexpander.h"
#include "corejsextensions.h"
#include "coreplugintr.h"
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
#include <QCoreApplication>
#include <QDebug>
#include <QJSEngine>
@@ -46,8 +46,7 @@ QString JsExpander::evaluate(const QString &expression, QString *errorMessage)
{
QJSValue value = d->m_engine.evaluate(expression);
if (value.isError()) {
const QString msg = QCoreApplication::translate("Core::JsExpander", "Error in \"%1\": %2")
.arg(expression, value.toString());
const QString msg = Tr::tr("Error in \"%1\": %2").arg(expression, value.toString());
if (errorMessage)
*errorMessage = msg;
return QString();
@@ -59,8 +58,7 @@ QString JsExpander::evaluate(const QString &expression, QString *errorMessage)
return QString::number(value.toNumber());
if (value.isString())
return value.toString();
QString msg = QCoreApplication::translate("Core::JsExpander",
"Cannot convert result of \"%1\" to string.").arg(expression);
QString msg = Tr::tr("Cannot convert result of \"%1\" to string.").arg(expression);
if (errorMessage)
*errorMessage = msg;
return QString();
@@ -75,11 +73,10 @@ void JsExpander::registerForExpander(Utils::MacroExpander *macroExpander)
{
macroExpander->registerPrefix(
"JS",
QCoreApplication::translate("Core::JsExpander",
"Evaluate simple JavaScript statements.<br>"
"Literal '}' characters must be escaped as \"\\}\", "
"'\\' characters must be escaped as \"\\\\\", "
"and \"%{\" must be escaped as \"%\\{\"."),
Tr::tr("Evaluate simple JavaScript statements.<br>"
"Literal '}' characters must be escaped as \"\\}\", "
"'\\' characters must be escaped as \"\\\\\", "
"and \"%{\" must be escaped as \"%\\{\"."),
[this](QString in) -> QString {
QString errorMessage;
QString result = evaluate(in, &errorMessage);

View File

@@ -4,8 +4,7 @@
#include "directoryfilter.h"
#include "locator.h"
#include <coreplugin/coreconstants.h>
#include "../coreplugintr.h"
#include <utils/algorithm.h>
#include <utils/fileutils.h>
@@ -16,7 +15,6 @@
#include <QCoreApplication>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QJsonArray>
#include <QJsonObject>
#include <QLabel>
@@ -45,7 +43,7 @@ const QStringList kExclusionFiltersDefault = {"*/.git/*", "*/.cvs/*", "*/.svn/*"
static QString defaultDisplayName()
{
return DirectoryFilter::tr("Generic Directory Filter");
return Tr::tr("Generic Directory Filter");
}
DirectoryFilter::DirectoryFilter(Id id)
@@ -55,9 +53,9 @@ DirectoryFilter::DirectoryFilter(Id id)
setId(id);
setDefaultIncludedByDefault(true);
setDisplayName(defaultDisplayName());
setDescription(tr("Matches all files from a custom set of directories. Append \"+<number>\" or "
"\":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
setDescription(Tr::tr("Matches all files from a custom set of directories. Append \"+<number>\" "
"or \":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
}
void DirectoryFilter::saveState(QJsonObject &object) const
@@ -148,13 +146,11 @@ void DirectoryFilter::restoreState(const QByteArray &state)
class DirectoryFilterOptions : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::DirectoryFilterOptions)
public:
DirectoryFilterOptions(QWidget *parent)
: QDialog(parent)
{
nameLabel = new QLabel(tr("Name:"));
nameLabel = new QLabel(Tr::tr("Name:"));
nameEdit = new QLineEdit(this);
filePatternLabel = new QLabel(this);
@@ -168,7 +164,7 @@ public:
shortcutEdit = new QLineEdit(this);
shortcutEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
shortcutEdit->setMaximumSize(QSize(16777215, 16777215));
shortcutEdit->setToolTip(tr("Specify a short word/abbreviation that can be used to "
shortcutEdit->setToolTip(Tr::tr("Specify a short word/abbreviation that can be used to "
"restrict completions to files from this directory tree.\n"
"To do this, you type this shortcut and a space in the "
"Locator entry field, and then the word to search for."));
@@ -176,11 +172,11 @@ public:
defaultFlag = new QCheckBox(this);
defaultFlag->setChecked(false);
directoryLabel = new QLabel(tr("Directories:"));
directoryLabel = new QLabel(Tr::tr("Directories:"));
addButton = new QPushButton(tr("Add..."));
editButton = new QPushButton(tr("Edit..."));
removeButton = new QPushButton(tr("Remove"));
addButton = new QPushButton(Tr::tr("Add..."));
editButton = new QPushButton(Tr::tr("Edit..."));
removeButton = new QPushButton(Tr::tr("Remove"));
directoryList = new QListWidget(this);
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -324,7 +320,7 @@ bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
void DirectoryFilter::handleAddDirectory()
{
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"));
FilePath dir = FileUtils::getExistingDirectory(m_dialog, Tr::tr("Select Directory"));
if (!dir.isEmpty())
m_dialog->directoryList->addItem(dir.toUserOutput());
}
@@ -334,7 +330,7 @@ void DirectoryFilter::handleEditDirectory()
if (m_dialog->directoryList->selectedItems().count() < 1)
return;
QListWidgetItem *currentItem = m_dialog->directoryList->selectedItems().at(0);
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"),
FilePath dir = FileUtils::getExistingDirectory(m_dialog, Tr::tr("Select Directory"),
FilePath::fromUserInput(currentItem->text()));
if (!dir.isEmpty())
currentItem->setText(dir.toUserOutput());
@@ -372,7 +368,7 @@ void DirectoryFilter::refresh(QFutureInterface<void> &future)
QMetaObject::invokeMethod(this, &DirectoryFilter::updateFileIterator,
Qt::QueuedConnection);
future.setProgressRange(0, 1);
future.setProgressValueAndText(1, tr("%1 filter update: 0 files").arg(displayName()));
future.setProgressValueAndText(1, Tr::tr("%1 filter update: 0 files").arg(displayName()));
return;
}
directories = m_directories;
@@ -390,7 +386,7 @@ void DirectoryFilter::refresh(QFutureInterface<void> &future)
if (future.isProgressUpdateNeeded()
|| future.progressValue() == 0 /*workaround for regression in Qt*/) {
future.setProgressValueAndText(subDirIterator.currentProgress(),
tr("%1 filter update: %n files", nullptr, filesFound.size()).arg(displayName()));
Tr::tr("%1 filter update: %n files", nullptr, filesFound.size()).arg(displayName()));
}
}
@@ -400,7 +396,7 @@ void DirectoryFilter::refresh(QFutureInterface<void> &future)
QMetaObject::invokeMethod(this, &DirectoryFilter::updateFileIterator, Qt::QueuedConnection);
future.setProgressValue(subDirIterator.maxProgress());
} else {
future.setProgressValueAndText(subDirIterator.currentProgress(), tr("%1 filter update: canceled").arg(displayName()));
future.setProgressValueAndText(subDirIterator.currentProgress(), Tr::tr("%1 filter update: canceled").arg(displayName()));
}
}

View File

@@ -3,9 +3,11 @@
#include "executefilter.h"
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/messagemanager.h>
#include "../coreplugintr.h"
#include "../icore.h"
#include "../editormanager/editormanager.h"
#include "../messagemanager.h"
#include <utils/algorithm.h>
#include <utils/environment.h>
#include <utils/macroexpander.h>
@@ -16,16 +18,15 @@
#include <QJsonObject>
#include <QMessageBox>
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
namespace Core::Internal {
ExecuteFilter::ExecuteFilter()
{
setId("Execute custom commands");
setDisplayName(tr("Execute Custom Commands"));
setDescription(tr(
setDisplayName(Tr::tr("Execute Custom Commands"));
setDescription(Tr::tr(
"Runs an arbitrary command with arguments. The command is searched for in the PATH "
"environment variable if needed. Note that the command is run directly, not in a shell."));
setDefaultShortcutString("!");
@@ -93,9 +94,9 @@ void ExecuteFilter::accept(const LocatorFilterEntry &selection,
d.workingDirectory = FilePath::fromString(workingDirectory);
if (m_process) {
const QString info(tr("Previous command is still running (\"%1\").\nDo you want to kill it?")
const QString info(Tr::tr("Previous command is still running (\"%1\").\nDo you want to kill it?")
.arg(p->headCommand()));
int r = QMessageBox::question(ICore::dialogParent(), tr("Kill Previous Process?"), info,
int r = QMessageBox::question(ICore::dialogParent(), Tr::tr("Kill Previous Process?"), info,
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::Yes);
if (r == QMessageBox::Cancel)
@@ -143,12 +144,12 @@ void ExecuteFilter::runHeadCommand()
const ExecuteData &d = m_taskQueue.head();
if (d.command.executable().isEmpty()) {
MessageManager::writeDisrupting(
tr("Could not find executable for \"%1\".").arg(d.command.executable().toUserOutput()));
Tr::tr("Could not find executable for \"%1\".").arg(d.command.executable().toUserOutput()));
m_taskQueue.dequeue();
runHeadCommand();
return;
}
MessageManager::writeDisrupting(tr("Starting command \"%1\".").arg(headCommand()));
MessageManager::writeDisrupting(Tr::tr("Starting command \"%1\".").arg(headCommand()));
QTC_CHECK(!m_process);
createProcess();
m_process->setWorkingDirectory(d.workingDirectory);
@@ -200,3 +201,5 @@ QString ExecuteFilter::headCommand() const
const ExecuteData &data = m_taskQueue.head();
return data.command.toUserOutput();
}
} // Core::Internal

View File

@@ -3,22 +3,23 @@
#include "externaltoolsfilter.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/externaltool.h>
#include <coreplugin/externaltoolmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include "../externaltool.h"
#include "../externaltoolmanager.h"
#include "../icore.h"
#include "../messagemanager.h"
#include <utils/qtcassert.h>
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
ExternalToolsFilter::ExternalToolsFilter()
{
setId("Run external tool");
setDisplayName(tr("Run External Tool"));
setDescription(tr("Runs an external tool that you have set up in the preferences (Environment > "
"External Tools)."));
setDisplayName(Tr::tr("Run External Tool"));
setDescription(Tr::tr("Runs an external tool that you have set up in the preferences "
"(Environment > External Tools)."));
setDefaultShortcutString("x");
setPriority(Medium);
}
@@ -82,3 +83,5 @@ void ExternalToolsFilter::prepareSearch(const QString &entry)
m_results = {};
m_results << bestEntries << betterEntries << goodEntries << configEntry;
}
} // Core::Internal

View File

@@ -4,14 +4,11 @@
#include "filesystemfilter.h"
#include "basefilefilter.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/vcsmanager.h>
#include "../coreplugintr.h"
#include "../documentmanager.h"
#include "../editormanager/editormanager.h"
#include "../icore.h"
#include "../vcsmanager.h"
#include <utils/checkablemessagebox.h>
#include <utils/environment.h>
@@ -19,7 +16,6 @@
#include <utils/layoutbuilder.h>
#include <utils/link.h>
#include <QApplication>
#include <QCheckBox>
#include <QDialog>
#include <QDialogButtonBox>
@@ -54,8 +50,8 @@ ILocatorFilter::MatchLevel FileSystemFilter::matchLevelFor(const QRegularExpress
FileSystemFilter::FileSystemFilter()
{
setId("Files in file system");
setDisplayName(tr("Files in File System"));
setDescription(tr("Opens a file given by a relative path to the current document, or absolute "
setDisplayName(Tr::tr("Files in File System"));
setDescription(Tr::tr("Opens a file given by a relative path to the current document, or absolute "
"path. \"~\" refers to your home directory. You have the option to create a "
"file if it does not exist yet."));
setDefaultShortcutString("f");
@@ -147,7 +143,7 @@ QList<LocatorFilterEntry> FileSystemFilter::matchesFor(QFutureInterface<LocatorF
const bool containsWildcard = expandedEntry.contains('?') || expandedEntry.contains('*');
if (!containsWildcard && !QFileInfo::exists(fullFilePath) && dirInfo.exists()) {
LocatorFilterEntry createAndOpen(this,
tr("Create and Open \"%1\"").arg(expandedEntry),
Tr::tr("Create and Open \"%1\"").arg(expandedEntry),
fullFilePath);
createAndOpen.filePath = FilePath::fromString(fullFilePath);
createAndOpen.extraInfo = FilePath::fromString(dirInfo.absolutePath()).shortNativePath();
@@ -178,14 +174,14 @@ void FileSystemFilter::accept(const LocatorFilterEntry &selection,
if (!selection.filePath.exists()) {
if (CheckableMessageBox::shouldAskAgain(ICore::settings(), kAlwaysCreate)) {
CheckableMessageBox messageBox(ICore::dialogParent());
messageBox.setWindowTitle(tr("Create File"));
messageBox.setWindowTitle(Tr::tr("Create File"));
messageBox.setIcon(QMessageBox::Question);
messageBox.setText(tr("Create \"%1\"?").arg(targetFile.shortNativePath()));
messageBox.setText(Tr::tr("Create \"%1\"?").arg(targetFile.shortNativePath()));
messageBox.setCheckBoxVisible(true);
messageBox.setCheckBoxText(tr("Always create"));
messageBox.setCheckBoxText(Tr::tr("Always create"));
messageBox.setChecked(false);
messageBox.setStandardButtons(QDialogButtonBox::Cancel);
QPushButton *createButton = messageBox.addButton(tr("Create"),
QPushButton *createButton = messageBox.addButton(Tr::tr("Create"),
QDialogButtonBox::AcceptRole);
messageBox.setDefaultButton(QDialogButtonBox::Cancel);
messageBox.exec();
@@ -206,8 +202,6 @@ void FileSystemFilter::accept(const LocatorFilterEntry &selection,
class FileSystemFilterOptions : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::FileSystemFilterOptions)
public:
FileSystemFilterOptions(QWidget *parent)
: QDialog(parent)
@@ -221,7 +215,7 @@ public:
shortcutEdit = new QLineEdit;
includeByDefault = new QCheckBox;
hiddenFilesFlag = new QCheckBox(tr("Include hidden files"));
hiddenFilesFlag = new QCheckBox(Tr::tr("Include hidden files"));
prefixLabel->setBuddy(shortcutEdit);
@@ -231,7 +225,7 @@ public:
Column {
Grid {
prefixLabel, shortcutEdit, includeByDefault, br,
tr("Filter:"), hiddenFilesFlag, br,
Tr::tr("Filter:"), hiddenFilesFlag, br,
},
st,
Row {st, buttonBox }

View File

@@ -3,7 +3,8 @@
#include "ilocatorfilter.h"
#include <coreplugin/coreconstants.h>
#include "../coreplugintr.h"
#include <utils/fuzzymatcher.h>
#include <QBoxLayout>
@@ -17,7 +18,6 @@
#include <QLineEdit>
#include <QRegularExpression>
using namespace Core;
using namespace Utils;
/*!
@@ -42,6 +42,8 @@ using namespace Utils;
\internal
*/
namespace Core {
static QList<ILocatorFilter *> g_locatorFilters;
/*!
@@ -252,7 +254,7 @@ LocatorFilterEntry::HighlightInfo ILocatorFilter::highlightInfo(
*/
QString ILocatorFilter::msgConfigureDialogTitle()
{
return tr("Filter Configuration");
return Tr::tr("Filter Configuration");
}
/*!
@@ -260,7 +262,7 @@ QString ILocatorFilter::msgConfigureDialogTitle()
*/
QString ILocatorFilter::msgPrefixLabel()
{
return tr("Prefix:");
return Tr::tr("Prefix:");
}
/*!
@@ -268,7 +270,7 @@ QString ILocatorFilter::msgPrefixLabel()
*/
QString ILocatorFilter::msgPrefixToolTip()
{
return tr("Type the prefix followed by a space and search term to restrict search to the filter.");
return Tr::tr("Type the prefix followed by a space and search term to restrict search to the filter.");
}
/*!
@@ -277,7 +279,7 @@ QString ILocatorFilter::msgPrefixToolTip()
*/
QString ILocatorFilter::msgIncludeByDefault()
{
return tr("Include by default");
return Tr::tr("Include by default");
}
/*!
@@ -286,7 +288,7 @@ QString ILocatorFilter::msgIncludeByDefault()
*/
QString ILocatorFilter::msgIncludeByDefaultToolTip()
{
return tr("Include the filter when not using a prefix for searches.");
return Tr::tr("Include the filter when not using a prefix for searches.");
}
/*!
@@ -644,3 +646,5 @@ bool ILocatorFilter::isOldSetting(const QByteArray &state)
The result has the highest number of matches for the regular
expression.
*/
} // Core

View File

@@ -3,6 +3,8 @@
#include "javascriptfilter.h"
#include "../coreplugintr.h"
#include <QClipboard>
#include <QGuiApplication>
#include <QJSEngine>
@@ -15,8 +17,8 @@ enum class EngineAction { Reset = 1, Abort };
JavaScriptFilter::JavaScriptFilter()
{
setId("JavaScriptFilter");
setDisplayName(tr("Evaluate JavaScript"));
setDescription(tr("Evaluates arbitrary JavaScript expressions and copies the result."));
setDisplayName(Tr::tr("Evaluate JavaScript"));
setDescription(Tr::tr("Evaluates arbitrary JavaScript expressions and copies the result."));
setDefaultIncludedByDefault(false);
setDefaultShortcutString("=");
m_abortTimer.setSingleShot(true);
@@ -50,17 +52,17 @@ QList<LocatorFilterEntry> JavaScriptFilter::matchesFor(
QList<LocatorFilterEntry> entries;
if (entry.trimmed().isEmpty()) {
entries.append({this, tr("Reset Engine"), QVariant::fromValue(EngineAction::Reset)});
entries.append({this, Tr::tr("Reset Engine"), QVariant::fromValue(EngineAction::Reset)});
} else {
const QString result = m_engine->evaluate(entry).toString();
if (m_aborted) {
const QString message = entry + " = " + tr("Engine aborted after timeout.");
const QString message = entry + " = " + Tr::tr("Engine aborted after timeout.");
entries.append({this, message, QVariant::fromValue(EngineAction::Abort)});
} else {
const QString expression = entry + " = " + result;
entries.append({this, expression, QVariant()});
entries.append({this, tr("Copy to clipboard: %1").arg(result), result});
entries.append({this, tr("Copy to clipboard: %1").arg(expression), expression});
entries.append({this, Tr::tr("Copy to clipboard: %1").arg(result), result});
entries.append({this, Tr::tr("Copy to clipboard: %1").arg(expression), expression});
}
}

View File

@@ -16,15 +16,16 @@
#include "opendocumentsfilter.h"
#include "spotlightlocatorfilter.h"
#include "urllocatorfilter.h"
#include "../actionmanager/actioncontainer.h"
#include "../actionmanager/actionmanager.h"
#include "../actionsfilter.h"
#include "../coreplugintr.h"
#include "../editormanager/editormanager_p.h"
#include "../icore.h"
#include "../progressmanager/taskprogress.h"
#include "../settingsdatabase.h"
#include "../statusbarmanager.h"
#include <coreplugin/icore.h>
#include <coreplugin/settingsdatabase.h>
#include <coreplugin/statusbarmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/editormanager/editormanager_p.h>
#include <coreplugin/actionsfilter.h>
#include <coreplugin/progressmanager/taskprogress.h>
#include <utils/algorithm.h>
#include <utils/asynctask.h>
#include <utils/qtcassert.h>
@@ -58,8 +59,8 @@ public:
ExternalToolsFilter m_externalToolsFilter;
LocatorFiltersFilter m_locatorsFiltersFilter;
ActionsFilter m_actionsFilter;
UrlLocatorFilter m_urlFilter{UrlLocatorFilter::tr("Web Search"), "RemoteHelpFilter"};
UrlLocatorFilter m_bugFilter{UrlLocatorFilter::tr("Qt Project Bugs"), "QtProjectBugs"};
UrlLocatorFilter m_urlFilter{Tr::tr("Web Search"), "RemoteHelpFilter"};
UrlLocatorFilter m_bugFilter{Tr::tr("Qt Project Bugs"), "QtProjectBugs"};
SpotlightLocatorFilter m_spotlightLocatorFilter;
};
@@ -100,9 +101,9 @@ void Locator::initialize()
{
m_locatorData = new LocatorData;
QAction *action = new QAction(Utils::Icons::ZOOM.icon(), tr("Locate..."), this);
QAction *action = new QAction(Utils::Icons::ZOOM.icon(), Tr::tr("Locate..."), this);
Command *cmd = ActionManager::registerAction(action, Constants::LOCATE);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+K")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+K")));
connect(action, &QAction::triggered, this, [] {
LocatorManager::show(QString());
});
@@ -239,7 +240,7 @@ void Locator::updateEditorManagerPlaceholderText()
{
Command *openCommand = ActionManager::command(Constants::OPEN);
Command *locateCommand = ActionManager::command(Constants::LOCATE);
const QString placeholderText = tr("<html><body style=\"color:#909090; font-size:14px\">"
const QString placeholderText = Tr::tr("<html><body style=\"color:#909090; font-size:14px\">"
"<div align='center'>"
"<div style=\"font-size:20px\">Open a document</div>"
"<table><tr><td>"
@@ -266,7 +267,7 @@ void Locator::updateEditorManagerPlaceholderText()
Utils::equal(&ILocatorFilter::id,
Id("Classes")));
if (classesFilter)
classes = tr("<div style=\"margin-left: 1em\">- type <code>%1&lt;space&gt;&lt;pattern&gt;</code>"
classes = Tr::tr("<div style=\"margin-left: 1em\">- type <code>%1&lt;space&gt;&lt;pattern&gt;</code>"
" to jump to a class definition</div>").arg(classesFilter->shortcutString());
QString methods;
@@ -274,7 +275,7 @@ void Locator::updateEditorManagerPlaceholderText()
ILocatorFilter *methodsFilter = Utils::findOrDefault(m_filters, Utils::equal(&ILocatorFilter::id,
Id("Methods")));
if (methodsFilter)
methods = tr("<div style=\"margin-left: 1em\">- type <code>%1&lt;space&gt;&lt;pattern&gt;</code>"
methods = Tr::tr("<div style=\"margin-left: 1em\">- type <code>%1&lt;space&gt;&lt;pattern&gt;</code>"
" to jump to a function definition</div>").arg(methodsFilter->shortcutString());
EditorManagerPrivate::setPlaceholderText(placeholderText.arg(classes, methods));
@@ -400,7 +401,7 @@ void Locator::refresh(const QList<ILocatorFilter *> &filters)
m_taskTree.release()->deleteLater();
});
auto progress = new TaskProgress(m_taskTree.get());
progress->setDisplayName(tr("Updating Locator Caches"));
progress->setDisplayName(Tr::tr("Updating Locator Caches"));
m_taskTree->start();
}

View File

@@ -9,7 +9,7 @@ namespace Core {
namespace Constants {
const char LOCATE[] = "QtCreator.Locate";
const char FILTER_OPTIONS_PAGE[] = QT_TRANSLATE_NOOP("Locator", "Locator");
const char FILTER_OPTIONS_PAGE[] = QT_TRANSLATE_NOOP("::Core", "Locator");
const char CUSTOM_DIRECTORY_FILTER_BASEID[] = "Locator.CustomFilter";
const char CUSTOM_URL_FILTER_BASEID[] = "Locator.CustomUrlFilter";
const char TASK_INDEX[] = "Locator.Task.Index";

View File

@@ -2,24 +2,23 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "locatorfiltersfilter.h"
#include "../actionmanager/actionmanager.h"
#include "locator.h"
#include "locatorwidget.h"
#include "../actionmanager/actionmanager.h"
#include "../coreplugintr.h"
#include <utils/qtcassert.h>
#include <utils/utilsicons.h>
using namespace Core;
using namespace Core::Internal;
Q_DECLARE_METATYPE(Core::ILocatorFilter*)
Q_DECLARE_METATYPE(ILocatorFilter*)
namespace Core::Internal {
LocatorFiltersFilter::LocatorFiltersFilter():
m_icon(Utils::Icons::NEXT.icon())
{
setId("FiltersFilter");
setDisplayName(tr("Available filters"));
setDisplayName(Tr::tr("Available filters"));
setDefaultIncludedByDefault(true);
setHidden(true);
setPriority(Highest);
@@ -86,3 +85,5 @@ void LocatorFiltersFilter::accept(const LocatorFilterEntry &selection,
*selectionStart = shortcutString.length() + 1;
}
}
} // Core::Internal

View File

@@ -8,17 +8,15 @@
#include "locator.h"
#include "locatorconstants.h"
#include "urllocatorfilter.h"
#include <utils/layoutbuilder.h>
#include <utils/treemodel.h>
#include <coreplugin/coreconstants.h>
#include "../coreconstants.h"
#include "../coreplugintr.h"
#include <utils/algorithm.h>
#include <utils/categorysortfiltermodel.h>
#include <utils/fancylineedit.h>
#include <utils/headerviewstretcher.h>
#include <utils/itemviews.h>
#include <utils/layoutbuilder.h>
#include <utils/qtcassert.h>
#include <utils/treemodel.h>
@@ -151,8 +149,6 @@ QVariant CategoryItem::data(int column, int role) const
class LocatorSettingsWidget : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::LocatorSettingsWidget)
public:
LocatorSettingsWidget()
{
@@ -160,16 +156,16 @@ public:
m_filters = Locator::filters();
m_customFilters = m_plugin->customFilters();
auto addButton = new QPushButton(tr("Add..."));
auto addButton = new QPushButton(Tr::tr("Add..."));
auto refreshIntervalLabel = new QLabel(tr("Refresh interval:"));
auto refreshIntervalLabel = new QLabel(Tr::tr("Refresh interval:"));
refreshIntervalLabel->setToolTip(
tr("Locator filters that do not update their cached data immediately, such as the "
Tr::tr("Locator filters that do not update their cached data immediately, such as the "
"custom directory filters, update it after this time interval."));
m_refreshInterval = new QSpinBox;
m_refreshInterval->setToolTip(refreshIntervalLabel->toolTip());
m_refreshInterval->setSuffix(tr(" min"));
m_refreshInterval->setSuffix(Tr::tr(" min"));
m_refreshInterval->setFrame(true);
m_refreshInterval->setButtonSymbols(QAbstractSpinBox::PlusMinus);
m_refreshInterval->setMaximum(320);
@@ -198,10 +194,10 @@ public:
new HeaderViewStretcher(m_filterList->header(), FilterName);
m_filterList->header()->setSortIndicator(FilterName, Qt::AscendingOrder);
m_removeButton = new QPushButton(tr("Remove"));
m_removeButton = new QPushButton(Tr::tr("Remove"));
m_removeButton->setEnabled(false);
m_editButton = new QPushButton(tr("Edit..."));
m_editButton = new QPushButton(Tr::tr("Edit..."));
m_editButton->setEnabled(false);
using namespace Layouting;
@@ -234,11 +230,11 @@ public:
&LocatorSettingsWidget::removeCustomFilter);
auto addMenu = new QMenu(addButton);
addMenu->addAction(tr("Files in Directories"), this, [this] {
addMenu->addAction(Tr::tr("Files in Directories"), this, [this] {
addCustomFilter(new DirectoryFilter(Id(Constants::CUSTOM_DIRECTORY_FILTER_BASEID)
.withSuffix(m_customFilters.size() + 1)));
});
addMenu->addAction(tr("URL Template"), this, [this] {
addMenu->addAction(Tr::tr("URL Template"), this, [this] {
auto filter = new UrlLocatorFilter(
Id(Constants::CUSTOM_URL_FILTER_BASEID).withSuffix(m_customFilters.size() + 1));
filter->setIsCustomFilter(true);
@@ -343,7 +339,7 @@ void LocatorSettingsWidget::restoreFilterStates()
void LocatorSettingsWidget::initializeModel()
{
m_model->setHeader({tr("Name"), tr("Prefix"), tr("Default")});
m_model->setHeader({Tr::tr("Name"), Tr::tr("Prefix"), Tr::tr("Default")});
m_model->setHeaderToolTip({
QString(),
ILocatorFilter::msgPrefixToolTip(),
@@ -351,11 +347,11 @@ void LocatorSettingsWidget::initializeModel()
});
m_model->clear();
QSet<ILocatorFilter *> customFilterSet = Utils::toSet(m_customFilters);
auto builtIn = new CategoryItem(tr("Built-in"), 0/*order*/);
auto builtIn = new CategoryItem(Tr::tr("Built-in"), 0/*order*/);
for (ILocatorFilter *filter : std::as_const(m_filters))
if (!filter->isHidden() && !customFilterSet.contains(filter))
builtIn->appendChild(new FilterItem(filter));
m_customFilterRoot = new CategoryItem(tr("Custom"), 1/*order*/);
m_customFilterRoot = new CategoryItem(Tr::tr("Custom"), 1/*order*/);
for (ILocatorFilter *customFilter : std::as_const(m_customFilters))
m_customFilterRoot->appendChild(new FilterItem(customFilter));
@@ -434,7 +430,7 @@ void LocatorSettingsWidget::removeCustomFilter()
LocatorSettingsPage::LocatorSettingsPage()
{
setId(Constants::FILTER_OPTIONS_PAGE);
setDisplayName(QCoreApplication::translate("Locator", Constants::FILTER_OPTIONS_PAGE));
setDisplayName(QCoreApplication::translate("::Core", Constants::FILTER_OPTIONS_PAGE));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
setWidgetCreator([] { return new LocatorSettingsWidget; });
}

View File

@@ -8,12 +8,11 @@
#include "locatorconstants.h"
#include "locatormanager.h"
#include "locatorsearchutils.h"
#include "../actionmanager/actionmanager.h"
#include "../coreplugintr.h"
#include "../icore.h"
#include "../modemanager.h"
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/icontext.h>
#include <coreplugin/mainwindow.h>
#include <utils/algorithm.h>
#include <utils/appmainwindow.h>
#include <utils/fancylineedit.h>
@@ -561,8 +560,8 @@ bool CompletionList::eventFilter(QObject *watched, QEvent *event)
LocatorWidget::LocatorWidget(Locator *locator)
: m_locatorModel(new LocatorModel(this))
, m_filterMenu(new QMenu(this))
, m_centeredPopupAction(new QAction(tr("Open as Centered Popup"), this))
, m_refreshAction(new QAction(tr("Refresh"), this))
, m_centeredPopupAction(new QAction(Tr::tr("Open as Centered Popup"), this))
, m_refreshAction(new QAction(Tr::tr("Refresh"), this))
, m_configureAction(new QAction(ICore::msgShowOptionsDialog(), this))
, m_fileLineEdit(new Utils::FancyLineEdit)
{
@@ -583,7 +582,7 @@ LocatorWidget::LocatorWidget(Locator *locator)
const QIcon icon = Utils::Icons::MAGNIFIER.icon();
m_fileLineEdit->setFiltering(true);
m_fileLineEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon);
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, tr("Options"));
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, Tr::tr("Options"));
m_fileLineEdit->setFocusPolicy(Qt::ClickFocus);
m_fileLineEdit->setButtonVisible(Utils::FancyLineEdit::Left, true);
// We set click focus since otherwise you will always get two popups
@@ -662,9 +661,9 @@ void LocatorWidget::updatePlaceholderText(Command *command)
{
QTC_ASSERT(command, return);
if (command->keySequence().isEmpty())
m_fileLineEdit->setPlaceholderText(tr("Type to locate"));
m_fileLineEdit->setPlaceholderText(Tr::tr("Type to locate"));
else
m_fileLineEdit->setPlaceholderText(tr("Type to locate (%1)").arg(
m_fileLineEdit->setPlaceholderText(Tr::tr("Type to locate (%1)").arg(
command->keySequence().toString(QKeySequence::NativeText)));
}

View File

@@ -3,26 +3,25 @@
#include "opendocumentsfilter.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/locator/basefilefilter.h>
#include "basefilefilter.h"
#include "../coreplugintr.h"
#include <utils/filepath.h>
#include <utils/link.h>
#include <utils/linecolumn.h>
#include <QAbstractItemModel>
#include <QFileInfo>
#include <QMutexLocker>
#include <QRegularExpression>
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
namespace Core::Internal {
OpenDocumentsFilter::OpenDocumentsFilter()
{
setId("Open documents");
setDisplayName(tr("Open Documents"));
setDisplayName(Tr::tr("Open Documents"));
setDefaultShortcutString("o");
setPriority(High);
setDefaultIncludedByDefault(true);
@@ -106,3 +105,5 @@ void OpenDocumentsFilter::accept(const LocatorFilterEntry &selection,
Q_UNUSED(selectionLength)
BaseFileFilter::openEditorAt(selection);
}
} // Core::Internal

View File

@@ -3,9 +3,9 @@
#include "spotlightlocatorfilter.h"
#include "../coreplugintr.h"
#include "../messagemanager.h"
#include <coreplugin/editormanager/editormanager.h>
#include <utils/algorithm.h>
#include <utils/commandline.h>
#include <utils/environment.h>
@@ -71,7 +71,7 @@ SpotlightIterator::SpotlightIterator(const QStringList &command)
QObject::connect(m_process.get(), &QtcProcess::done,
m_process.get(), [this, cmd = command.first()] {
if (m_process->result() != ProcessResult::FinishedWithSuccess) {
MessageManager::writeFlashing(SpotlightLocatorFilter::tr(
MessageManager::writeFlashing(Tr::tr(
"Locator: Error occurred when running \"%1\".").arg(cmd));
}
scheduleKillProcess();
@@ -196,24 +196,21 @@ static MacroExpander *createMacroExpander(const QString &query)
{
MacroExpander *expander = new MacroExpander;
expander->registerVariable("Query",
SpotlightLocatorFilter::tr("Locator query string."),
Tr::tr("Locator query string."),
[query] { return query; });
expander->registerVariable("Query:Escaped",
SpotlightLocatorFilter::tr(
"Locator query string with quotes escaped with backslash."),
Tr::tr("Locator query string with quotes escaped with backslash."),
[query] { return escaped(query); });
expander->registerVariable("Query:EscapedWithWildcards",
SpotlightLocatorFilter::tr(
"Locator query string with quotes escaped with backslash and "
"spaces replaced with \"*\" wildcards."),
Tr::tr("Locator query string with quotes escaped with backslash and "
"spaces replaced with \"*\" wildcards."),
[query] {
QString quoted = escaped(query);
quoted.replace(' ', '*');
return quoted;
});
expander->registerVariable("Query:Regex",
SpotlightLocatorFilter::tr(
"Locator query string as regular expression."),
Tr::tr("Locator query string as regular expression."),
[query] {
QString regex = query;
regex = regex.replace('*', ".*");
@@ -228,9 +225,9 @@ SpotlightLocatorFilter::SpotlightLocatorFilter()
setId("SpotlightFileNamesLocatorFilter");
setDefaultShortcutString("md");
setDefaultIncludedByDefault(false);
setDisplayName(tr("File Name Index"));
setDisplayName(Tr::tr("File Name Index"));
setDescription(
tr("Matches files from a global file system index (Spotlight, Locate, Everything). Append "
Tr::tr("Matches files from a global file system index (Spotlight, Locate, Everything). Append "
"\"+<number>\" or \":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well."));
setConfigurable(true);
@@ -271,9 +268,9 @@ bool SpotlightLocatorFilter::openConfigDialog(QWidget *parent, bool &needsRefres
argumentsEdit->setText(m_arguments);
FancyLineEdit *caseSensitiveArgumentsEdit = new FancyLineEdit;
caseSensitiveArgumentsEdit->setText(m_caseSensitiveArguments);
layout->addRow(tr("Executable:"), commandEdit);
layout->addRow(tr("Arguments:"), argumentsEdit);
layout->addRow(tr("Case sensitive:"), caseSensitiveArgumentsEdit);
layout->addRow(Tr::tr("Executable:"), commandEdit);
layout->addRow(Tr::tr("Arguments:"), argumentsEdit);
layout->addRow(Tr::tr("Case sensitive:"), caseSensitiveArgumentsEdit);
std::unique_ptr<MacroExpander> expander(createMacroExpander(""));
auto chooser = new VariableChooser(&configWidget);
chooser->addMacroExpanderProvider([expander = expander.get()] { return expander; });

View File

@@ -3,6 +3,8 @@
#include "urllocatorfilter.h"
#include "../coreplugintr.h"
#include <utils/algorithm.h>
#include <utils/layoutbuilder.h>
#include <utils/stringutils.h>
@@ -31,7 +33,7 @@ UrlFilterOptions::UrlFilterOptions(UrlLocatorFilter *filter, QWidget *parent)
setWindowTitle(ILocatorFilter::msgConfigureDialogTitle());
resize(600, 400);
auto nameLabel = new QLabel(tr("Name:"));
auto nameLabel = new QLabel(Tr::tr("Name:"));
nameLabel->setVisible(filter->isCustomFilter());
nameEdit = new QLineEdit;
@@ -42,7 +44,7 @@ UrlFilterOptions::UrlFilterOptions(UrlLocatorFilter *filter, QWidget *parent)
listWidget = new QListWidget;
listWidget->setDragDropMode(QAbstractItemView::InternalMove);
listWidget->setToolTip(
tr("Add \"%1\" placeholder for the query string.\nDouble-click to edit item."));
Tr::tr("Add \"%1\" placeholder for the query string.\nDouble-click to edit item."));
const QStringList remoteUrls = m_filter->remoteUrls();
for (const QString &url : remoteUrls) {
auto item = new QListWidgetItem(url);
@@ -50,10 +52,10 @@ UrlFilterOptions::UrlFilterOptions(UrlLocatorFilter *filter, QWidget *parent)
item->setFlags(item->flags() | Qt::ItemIsEditable);
}
auto add = new QPushButton(tr("Add"));
remove = new QPushButton(tr("Remove"));
moveUp = new QPushButton(tr("Move Up"));
moveDown = new QPushButton(tr("Move Down"));
auto add = new QPushButton(Tr::tr("Add"));
remove = new QPushButton(Tr::tr("Remove"));
moveUp = new QPushButton(Tr::tr("Move Up"));
moveDown = new QPushButton(Tr::tr("Move Down"));
auto prefixLabel = new QLabel;
prefixLabel->setText(Core::ILocatorFilter::msgPrefixLabel());
@@ -76,7 +78,7 @@ UrlFilterOptions::UrlFilterOptions(UrlLocatorFilter *filter, QWidget *parent)
Grid {
nameLabel, nameEdit, br,
Column { tr("URLs:"), st }, Row { listWidget, buttons}, br,
Column { Tr::tr("URLs:"), st }, Row { listWidget, buttons}, br,
prefixLabel, Row { shortcutEdit, includeByDefault, st }, br,
Span(2, buttonBox)
}.attachTo(this);
@@ -152,7 +154,7 @@ void UrlFilterOptions::updateActionButtons()
*/
UrlLocatorFilter::UrlLocatorFilter(Id id)
: UrlLocatorFilter(tr("URL Template"), id)
: UrlLocatorFilter(Tr::tr("URL Template"), id)
{}
UrlLocatorFilter::UrlLocatorFilter(const QString &displayName, Id id)

View File

@@ -5,6 +5,7 @@
#include "actionmanager/actionmanager.h"
#include "coreicons.h"
#include "coreplugintr.h"
#include "icore.h"
#include "loggingmanager.h"
@@ -214,9 +215,9 @@ QVariant LoggingCategoryModel::headerData(int section, Qt::Orientation orientati
{
if (role == Qt::DisplayRole && orientation == Qt::Horizontal && section >= 0 && section < 3) {
switch (section) {
case 0: return tr("Category");
case 1: return tr("Type");
case 2: return tr("Color");
case 0: return Tr::tr("Category");
case 1: return Tr::tr("Type");
case 2: return Tr::tr("Color");
}
}
return {};
@@ -326,7 +327,6 @@ public:
class LoggingViewManagerWidget : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(LoggingViewManagerWidget)
public:
explicit LoggingViewManagerWidget(QWidget *parent);
~LoggingViewManagerWidget()
@@ -382,7 +382,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
: QDialog(parent)
, m_manager(new LoggingViewManager)
{
setWindowTitle(tr("Logging Category Viewer"));
setWindowTitle(Tr::tr("Logging Category Viewer"));
setModal(false);
auto mainLayout = new QVBoxLayout;
@@ -392,25 +392,25 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
// add further buttons..
auto save = new QToolButton;
save->setIcon(Utils::Icons::SAVEFILE.icon());
save->setToolTip(tr("Save Log"));
save->setToolTip(Tr::tr("Save Log"));
buttonsLayout->addWidget(save);
auto clean = new QToolButton;
clean->setIcon(Utils::Icons::CLEAN.icon());
clean->setToolTip(tr("Clear"));
clean->setToolTip(Tr::tr("Clear"));
buttonsLayout->addWidget(clean);
auto stop = new QToolButton;
stop->setIcon(Utils::Icons::STOP_SMALL.icon());
stop->setToolTip(tr("Stop Logging"));
stop->setToolTip(Tr::tr("Stop Logging"));
buttonsLayout->addWidget(stop);
auto qtInternal = new QToolButton;
qtInternal->setIcon(Core::Icons::QTLOGO.icon());
qtInternal->setToolTip(tr("Toggle Qt Internal Logging"));
qtInternal->setToolTip(Tr::tr("Toggle Qt Internal Logging"));
qtInternal->setCheckable(true);
qtInternal->setChecked(false);
buttonsLayout->addWidget(qtInternal);
auto autoScroll = new QToolButton;
autoScroll->setIcon(Utils::Icons::ARROW_DOWN.icon());
autoScroll->setToolTip(tr("Auto Scroll"));
autoScroll->setToolTip(Tr::tr("Auto Scroll"));
autoScroll->setCheckable(true);
autoScroll->setChecked(true);
buttonsLayout->addWidget(autoScroll);
@@ -418,7 +418,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
auto icon = Utils::Icon({{":/utils/images/stopwatch.png", Utils::Theme::PanelTextColorMid}},
Utils::Icon::Tint);
m_timestamps->setIcon(icon.icon());
m_timestamps->setToolTip(tr("Timestamps"));
m_timestamps->setToolTip(Tr::tr("Timestamps"));
m_timestamps->setCheckable(true);
m_timestamps->setChecked(true);
buttonsLayout->addWidget(m_timestamps);
@@ -426,7 +426,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
icon = Utils::Icon({{":/utils/images/message.png", Utils::Theme::PanelTextColorMid}},
Utils::Icon::Tint);
m_messageTypes->setIcon(icon.icon());
m_messageTypes->setToolTip(tr("Message Types"));
m_messageTypes->setToolTip(Tr::tr("Message Types"));
m_messageTypes->setCheckable(true);
m_messageTypes->setChecked(false);
buttonsLayout->addWidget(m_messageTypes);
@@ -437,7 +437,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
auto horizontal = new QHBoxLayout;
m_logView = new Utils::BaseTreeView;
m_logModel = new Utils::ListModel<LogEntry>;
m_logModel->setHeader({tr("Timestamp"), tr("Category"), tr("Type"), tr("Message")});
m_logModel->setHeader({Tr::tr("Timestamp"), Tr::tr("Category"), Tr::tr("Type"), Tr::tr("Message")});
m_logModel->setDataAccessor(&logEntryDataAccessor);
m_logView->setModel(m_logModel);
horizontal->addWidget(m_logView);
@@ -520,11 +520,11 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
if (m_manager->isEnabled()) {
m_manager->setEnabled(false);
stop->setIcon(Utils::Icons::RUN_SMALL.icon());
stop->setToolTip(tr("Start Logging"));
stop->setToolTip(Tr::tr("Start Logging"));
} else {
m_manager->setEnabled(true);
stop->setIcon(Utils::Icons::STOP_SMALL.icon());
stop->setToolTip(tr("Stop Logging"));
stop->setToolTip(Tr::tr("Stop Logging"));
}
});
connect(qtInternal, &QToolButton::toggled, m_manager, &LoggingViewManager::setListQtInternal);
@@ -539,9 +539,9 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
void LoggingViewManagerWidget::showLogViewContextMenu(const QPoint &pos) const
{
QMenu m;
auto copy = new QAction(tr("Copy Selected Logs"), &m);
auto copy = new QAction(Tr::tr("Copy Selected Logs"), &m);
m.addAction(copy);
auto copyAll = new QAction(tr("Copy All"), &m);
auto copyAll = new QAction(Tr::tr("Copy All"), &m);
m.addAction(copyAll);
connect(copy, &QAction::triggered, &m, [this] {
auto selectionModel = m_logView->selectionModel();
@@ -572,11 +572,11 @@ void LoggingViewManagerWidget::showLogCategoryContextMenu(const QPoint &pos) con
{
QMenu m;
// minimal load/save - plugins could later provide presets on their own?
auto savePreset = new QAction(tr("Save Enabled as Preset..."), &m);
auto savePreset = new QAction(Tr::tr("Save Enabled as Preset..."), &m);
m.addAction(savePreset);
auto loadPreset = new QAction(tr("Update from Preset..."), &m);
auto loadPreset = new QAction(Tr::tr("Update from Preset..."), &m);
m.addAction(loadPreset);
auto uncheckAll = new QAction(tr("Uncheck All"), &m);
auto uncheckAll = new QAction(Tr::tr("Uncheck All"), &m);
m.addAction(uncheckAll);
connect(savePreset, &QAction::triggered,
this, &LoggingViewManagerWidget::saveEnabledCategoryPreset);
@@ -595,7 +595,7 @@ void LoggingViewManagerWidget::saveLoggingsToFile() const
if (enabled)
m_manager->setEnabled(false);
const Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(),
tr("Save Logs As"));
Tr::tr("Save Logs As"));
if (fp.isEmpty())
return;
const bool useTS = m_timestamps->isChecked();
@@ -606,23 +606,23 @@ void LoggingViewManagerWidget::saveLoggingsToFile() const
qint64 res = file.write( m_logModel->dataAt(row).outputLine(useTS, useLL).toUtf8());
if (res == -1) {
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to write logs to \"%1\".").arg(fp.toUserOutput()));
ICore::dialogParent(), Tr::tr("Error"),
Tr::tr("Failed to write logs to \"%1\".").arg(fp.toUserOutput()));
break;
}
}
file.close();
} else {
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to open file \"%1\" for writing logs.").arg(fp.toUserOutput()));
ICore::dialogParent(), Tr::tr("Error"),
Tr::tr("Failed to open file \"%1\" for writing logs.").arg(fp.toUserOutput()));
}
}
void LoggingViewManagerWidget::saveEnabledCategoryPreset() const
{
Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(),
tr("Save Enabled Categories As"));
Tr::tr("Save Enabled Categories As"));
if (fp.isEmpty())
return;
const QList<LoggingCategoryItem> enabled = m_categoryModel->enabledCategories();
@@ -641,30 +641,30 @@ void LoggingViewManagerWidget::saveEnabledCategoryPreset() const
QJsonDocument doc(array);
if (!fp.writeFileContents(doc.toJson(QJsonDocument::Compact)))
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to write preset file \"%1\".").arg(fp.toUserOutput()));
ICore::dialogParent(), Tr::tr("Error"),
Tr::tr("Failed to write preset file \"%1\".").arg(fp.toUserOutput()));
}
void LoggingViewManagerWidget::loadAndUpdateFromPreset()
{
Utils::FilePath fp = Utils::FileUtils::getOpenFilePath(ICore::dialogParent(),
tr("Load Enabled Categories From"));
Tr::tr("Load Enabled Categories From"));
if (fp.isEmpty())
return;
// read file, update categories
const Utils::expected_str<QByteArray> contents = fp.fileContents();
if (!contents) {
QMessageBox::critical(ICore::dialogParent(),
tr("Error"),
tr("Failed to open preset file \"%1\" for reading")
Tr::tr("Error"),
Tr::tr("Failed to open preset file \"%1\" for reading")
.arg(fp.toUserOutput()));
return;
}
QJsonParseError error;
QJsonDocument doc = QJsonDocument::fromJson(*contents, &error);
if (error.error != QJsonParseError::NoError) {
QMessageBox::critical(ICore::dialogParent(), tr("Error"),
tr("Failed to read preset file \"%1\": %2").arg(fp.toUserOutput())
QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"),
Tr::tr("Failed to read preset file \"%1\": %2").arg(fp.toUserOutput())
.arg(error.errorString()));
return;
}
@@ -691,8 +691,8 @@ void LoggingViewManagerWidget::loadAndUpdateFromPreset()
}
if (formatError) {
QMessageBox::critical(ICore::dialogParent(), tr("Error"),
tr("Unexpected preset file format."));
QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"),
Tr::tr("Unexpected preset file format."));
}
for (const LoggingCategoryItem &item : presetItems)
m_manager->appendOrUpdate(item.name, item.entry);

View File

@@ -3,17 +3,31 @@
#include "mainwindow.h"
#include "actionmanager/actioncontainer.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "coreicons.h"
#include "coreplugintr.h"
#include "dialogs/externaltoolconfig.h"
#include "dialogs/shortcutsettings.h"
#include "documentmanager.h"
#include "editormanager/documentmodel_p.h"
#include "editormanager/editormanager.h"
#include "editormanager/editormanager_p.h"
#include "editormanager/ieditor.h"
#include "editormanager/ieditorfactory.h"
#include "editormanager/systemeditor.h"
#include "externaltoolmanager.h"
#include "fancytabwidget.h"
#include "fileutils.h"
#include "find/basetextfind.h"
#include "findplaceholder.h"
#include "generalsettings.h"
#include "helpmanager.h"
#include "icore.h"
#include "idocumentfactory.h"
#include "inavigationwidgetfactory.h"
#include "iwizardfactory.h"
#include "jsexpander.h"
#include "loggingviewer.h"
#include "manhattanstyle.h"
@@ -23,7 +37,10 @@
#include "navigationwidget.h"
#include "outputpanemanager.h"
#include "plugindialog.h"
#include "progressmanager/progressmanager_p.h"
#include "progressmanager/progressview.h"
#include "rightpane.h"
#include "settingsdatabase.h"
#include "statusbarmanager.h"
#include "systemsettings.h"
#include "vcsmanager.h"
@@ -31,25 +48,9 @@
#include "windowsupport.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actionmanager_p.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/dialogs/externaltoolconfig.h>
#include <coreplugin/dialogs/shortcutsettings.h>
#include <coreplugin/editormanager/documentmodel_p.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/editormanager_p.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/inavigationwidgetfactory.h>
#include <coreplugin/iwizardfactory.h>
#include <coreplugin/progressmanager/progressmanager_p.h>
#include <coreplugin/progressmanager/progressview.h>
#include <coreplugin/settingsdatabase.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/fsengine/fileiconprovider.h>
#include <utils/fsengine/fsengine.h>
@@ -380,8 +381,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
if (m_askConfirmationBeforeExit &&
(QMessageBox::question(this,
tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME),
tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME),
Tr::tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME),
Tr::tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No)
== QMessageBox::No)) {
@@ -466,7 +467,7 @@ void MainWindow::registerDefaultContainers()
// File Menu
ActionContainer *filemenu = ActionManager::createMenu(Constants::M_FILE);
menubar->addMenu(filemenu, Constants::G_FILE);
filemenu->menu()->setTitle(tr("&File"));
filemenu->menu()->setTitle(Tr::tr("&File"));
filemenu->appendGroup(Constants::G_FILE_NEW);
filemenu->appendGroup(Constants::G_FILE_OPEN);
filemenu->appendGroup(Constants::G_FILE_PROJECT);
@@ -481,7 +482,7 @@ void MainWindow::registerDefaultContainers()
// Edit Menu
ActionContainer *medit = ActionManager::createMenu(Constants::M_EDIT);
menubar->addMenu(medit, Constants::G_EDIT);
medit->menu()->setTitle(tr("&Edit"));
medit->menu()->setTitle(Tr::tr("&Edit"));
medit->appendGroup(Constants::G_EDIT_UNDOREDO);
medit->appendGroup(Constants::G_EDIT_COPYPASTE);
medit->appendGroup(Constants::G_EDIT_SELECTALL);
@@ -491,19 +492,19 @@ void MainWindow::registerDefaultContainers()
ActionContainer *mview = ActionManager::createMenu(Constants::M_VIEW);
menubar->addMenu(mview, Constants::G_VIEW);
mview->menu()->setTitle(tr("&View"));
mview->menu()->setTitle(Tr::tr("&View"));
mview->appendGroup(Constants::G_VIEW_VIEWS);
mview->appendGroup(Constants::G_VIEW_PANES);
// Tools Menu
ActionContainer *ac = ActionManager::createMenu(Constants::M_TOOLS);
menubar->addMenu(ac, Constants::G_TOOLS);
ac->menu()->setTitle(tr("&Tools"));
ac->menu()->setTitle(Tr::tr("&Tools"));
// Window Menu
ActionContainer *mwindow = ActionManager::createMenu(Constants::M_WINDOW);
menubar->addMenu(mwindow, Constants::G_WINDOW);
mwindow->menu()->setTitle(tr("&Window"));
mwindow->menu()->setTitle(Tr::tr("&Window"));
mwindow->appendGroup(Constants::G_WINDOW_SIZE);
mwindow->appendGroup(Constants::G_WINDOW_SPLIT);
mwindow->appendGroup(Constants::G_WINDOW_NAVIGATE);
@@ -513,7 +514,7 @@ void MainWindow::registerDefaultContainers()
// Help Menu
ac = ActionManager::createMenu(Constants::M_HELP);
menubar->addMenu(ac, Constants::G_HELP);
ac->menu()->setTitle(tr("&Help"));
ac->menu()->setTitle(Tr::tr("&Help"));
Theme::setHelpMenu(ac->menu());
ac->appendGroup(Constants::G_HELP_HELP);
ac->appendGroup(Constants::G_HELP_SUPPORT);
@@ -554,7 +555,7 @@ void MainWindow::registerDefaultActions()
// Return to editor shortcut: Note this requires Qt to fix up
// handling of shortcut overrides in menus, item views, combos....
m_focusToEditor = new QAction(tr("Return to Editor"), this);
m_focusToEditor = new QAction(Tr::tr("Return to Editor"), this);
Command *cmd = ActionManager::registerAction(m_focusToEditor, Constants::S_RETURNTOEDITOR);
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_Escape));
connect(m_focusToEditor, &QAction::triggered, this, &MainWindow::setFocusToEditor);
@@ -562,14 +563,14 @@ void MainWindow::registerDefaultActions()
// New File Action
QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), Utils::Icons::NEWFILE.icon());
m_newAction = new QAction(icon, tr("&New Project..."), this);
m_newAction = new QAction(icon, Tr::tr("&New Project..."), this);
cmd = ActionManager::registerAction(m_newAction, Constants::NEW);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+Shift+N"));
mfile->addAction(cmd, Constants::G_FILE_NEW);
connect(m_newAction, &QAction::triggered, this, [] {
if (!ICore::isNewItemDialogRunning()) {
ICore::showNewItemDialog(
tr("New Project", "Title of dialog"),
Tr::tr("New Project", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
Utils::equal(&Core::IWizardFactory::kind,
Core::IWizardFactory::ProjectWizard)),
@@ -579,13 +580,13 @@ void MainWindow::registerDefaultActions()
}
});
auto action = new QAction(icon, tr("New File..."), this);
auto action = new QAction(icon, Tr::tr("New File..."), this);
cmd = ActionManager::registerAction(action, Constants::NEW_FILE);
cmd->setDefaultKeySequence(QKeySequence::New);
mfile->addAction(cmd, Constants::G_FILE_NEW);
connect(action, &QAction::triggered, this, [] {
if (!ICore::isNewItemDialogRunning()) {
ICore::showNewItemDialog(tr("New File", "Title of dialog"),
ICore::showNewItemDialog(Tr::tr("New File", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
Utils::equal(&Core::IWizardFactory::kind,
Core::IWizardFactory::FileWizard)),
@@ -597,14 +598,14 @@ void MainWindow::registerDefaultActions()
// Open Action
icon = QIcon::fromTheme(QLatin1String("document-open"), Utils::Icons::OPENFILE.icon());
m_openAction = new QAction(icon, tr("&Open File or Project..."), this);
m_openAction = new QAction(icon, Tr::tr("&Open File or Project..."), this);
cmd = ActionManager::registerAction(m_openAction, Constants::OPEN);
cmd->setDefaultKeySequence(QKeySequence::Open);
mfile->addAction(cmd, Constants::G_FILE_OPEN);
connect(m_openAction, &QAction::triggered, this, &MainWindow::openFile);
// Open With Action
m_openWithAction = new QAction(tr("Open File &With..."), this);
m_openWithAction = new QAction(Tr::tr("Open File &With..."), this);
cmd = ActionManager::registerAction(m_openWithAction, Constants::OPEN_WITH);
mfile->addAction(cmd, Constants::G_FILE_OPEN);
connect(m_openWithAction, &QAction::triggered, this, &MainWindow::openFileWith);
@@ -620,27 +621,27 @@ void MainWindow::registerDefaultActions()
// File->Recent Files Menu
ActionContainer *ac = ActionManager::createMenu(Constants::M_FILE_RECENTFILES);
mfile->addMenu(ac, Constants::G_FILE_OPEN);
ac->menu()->setTitle(tr("Recent &Files"));
ac->menu()->setTitle(Tr::tr("Recent &Files"));
ac->setOnAllDisabledBehavior(ActionContainer::Show);
// Save Action
icon = QIcon::fromTheme(QLatin1String("document-save"), Utils::Icons::SAVEFILE.icon());
QAction *tmpaction = new QAction(icon, EditorManager::tr("&Save"), this);
QAction *tmpaction = new QAction(icon, Tr::tr("&Save"), this);
tmpaction->setEnabled(false);
cmd = ActionManager::registerAction(tmpaction, Constants::SAVE);
cmd->setDefaultKeySequence(QKeySequence::Save);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(tr("Save"));
cmd->setDescription(Tr::tr("Save"));
mfile->addAction(cmd, Constants::G_FILE_SAVE);
// Save As Action
icon = QIcon::fromTheme(QLatin1String("document-save-as"));
tmpaction = new QAction(icon, EditorManager::tr("Save &As..."), this);
tmpaction = new QAction(icon, Tr::tr("Save &As..."), this);
tmpaction->setEnabled(false);
cmd = ActionManager::registerAction(tmpaction, Constants::SAVEAS);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+S") : QString()));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+S") : QString()));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(tr("Save As..."));
cmd->setDescription(Tr::tr("Save As..."));
mfile->addAction(cmd, Constants::G_FILE_SAVE);
// SaveAll Action
@@ -648,7 +649,7 @@ void MainWindow::registerDefaultActions()
// Print Action
icon = QIcon::fromTheme(QLatin1String("document-print"));
tmpaction = new QAction(icon, tr("&Print..."), this);
tmpaction = new QAction(icon, Tr::tr("&Print..."), this);
tmpaction->setEnabled(false);
cmd = ActionManager::registerAction(tmpaction, Constants::PRINT);
cmd->setDefaultKeySequence(QKeySequence::Print);
@@ -656,36 +657,36 @@ void MainWindow::registerDefaultActions()
// Exit Action
icon = QIcon::fromTheme(QLatin1String("application-exit"));
m_exitAction = new QAction(icon, tr("E&xit"), this);
m_exitAction = new QAction(icon, Tr::tr("E&xit"), this);
m_exitAction->setMenuRole(QAction::QuitRole);
cmd = ActionManager::registerAction(m_exitAction, Constants::EXIT);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Q")));
mfile->addAction(cmd, Constants::G_FILE_OTHER);
connect(m_exitAction, &QAction::triggered, this, &MainWindow::exit);
// Undo Action
icon = QIcon::fromTheme(QLatin1String("edit-undo"), Utils::Icons::UNDO.icon());
tmpaction = new QAction(icon, tr("&Undo"), this);
tmpaction = new QAction(icon, Tr::tr("&Undo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::UNDO);
cmd->setDefaultKeySequence(QKeySequence::Undo);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(tr("Undo"));
cmd->setDescription(Tr::tr("Undo"));
medit->addAction(cmd, Constants::G_EDIT_UNDOREDO);
tmpaction->setEnabled(false);
// Redo Action
icon = QIcon::fromTheme(QLatin1String("edit-redo"), Utils::Icons::REDO.icon());
tmpaction = new QAction(icon, tr("&Redo"), this);
tmpaction = new QAction(icon, Tr::tr("&Redo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::REDO);
cmd->setDefaultKeySequence(QKeySequence::Redo);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(tr("Redo"));
cmd->setDescription(Tr::tr("Redo"));
medit->addAction(cmd, Constants::G_EDIT_UNDOREDO);
tmpaction->setEnabled(false);
// Cut Action
icon = QIcon::fromTheme(QLatin1String("edit-cut"), Utils::Icons::CUT.icon());
tmpaction = new QAction(icon, tr("Cu&t"), this);
tmpaction = new QAction(icon, Tr::tr("Cu&t"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::CUT);
cmd->setDefaultKeySequence(QKeySequence::Cut);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
@@ -693,7 +694,7 @@ void MainWindow::registerDefaultActions()
// Copy Action
icon = QIcon::fromTheme(QLatin1String("edit-copy"), Utils::Icons::COPY.icon());
tmpaction = new QAction(icon, tr("&Copy"), this);
tmpaction = new QAction(icon, Tr::tr("&Copy"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::COPY);
cmd->setDefaultKeySequence(QKeySequence::Copy);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
@@ -701,7 +702,7 @@ void MainWindow::registerDefaultActions()
// Paste Action
icon = QIcon::fromTheme(QLatin1String("edit-paste"), Utils::Icons::PASTE.icon());
tmpaction = new QAction(icon, tr("&Paste"), this);
tmpaction = new QAction(icon, Tr::tr("&Paste"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::PASTE);
cmd->setDefaultKeySequence(QKeySequence::Paste);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
@@ -709,7 +710,7 @@ void MainWindow::registerDefaultActions()
// Select All
icon = QIcon::fromTheme(QLatin1String("edit-select-all"));
tmpaction = new QAction(icon, tr("Select &All"), this);
tmpaction = new QAction(icon, Tr::tr("Select &All"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::SELECTALL);
cmd->setDefaultKeySequence(QKeySequence::SelectAll);
medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
@@ -717,46 +718,46 @@ void MainWindow::registerDefaultActions()
// Goto Action
icon = QIcon::fromTheme(QLatin1String("go-jump"));
tmpaction = new QAction(icon, tr("&Go to Line..."), this);
tmpaction = new QAction(icon, Tr::tr("&Go to Line..."), this);
cmd = ActionManager::registerAction(tmpaction, Constants::GOTO);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+L")));
medit->addAction(cmd, Constants::G_EDIT_OTHER);
tmpaction->setEnabled(false);
// Zoom In Action
icon = QIcon::hasThemeIcon("zoom-in") ? QIcon::fromTheme("zoom-in")
: Utils::Icons::ZOOMIN_TOOLBAR.icon();
tmpaction = new QAction(icon, tr("Zoom In"), this);
tmpaction = new QAction(icon, Tr::tr("Zoom In"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::ZOOM_IN);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl++")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl++")));
tmpaction->setEnabled(false);
// Zoom Out Action
icon = QIcon::hasThemeIcon("zoom-out") ? QIcon::fromTheme("zoom-out")
: Utils::Icons::ZOOMOUT_TOOLBAR.icon();
tmpaction = new QAction(icon, tr("Zoom Out"), this);
tmpaction = new QAction(icon, Tr::tr("Zoom Out"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::ZOOM_OUT);
if (useMacShortcuts)
cmd->setDefaultKeySequences({QKeySequence(tr("Ctrl+-")), QKeySequence(tr("Ctrl+Shift+-"))});
cmd->setDefaultKeySequences({QKeySequence(Tr::tr("Ctrl+-")), QKeySequence(Tr::tr("Ctrl+Shift+-"))});
else
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+-")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+-")));
tmpaction->setEnabled(false);
// Zoom Reset Action
icon = QIcon::hasThemeIcon("zoom-original") ? QIcon::fromTheme("zoom-original")
: Utils::Icons::EYE_OPEN_TOOLBAR.icon();
tmpaction = new QAction(icon, tr("Original Size"), this);
tmpaction = new QAction(icon, Tr::tr("Original Size"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::ZOOM_RESET);
cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+0") : tr("Ctrl+0")));
cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+0") : Tr::tr("Ctrl+0")));
tmpaction->setEnabled(false);
// Debug Qt Creator menu
mtools->appendGroup(Constants::G_TOOLS_DEBUG);
ActionContainer *mtoolsdebug = ActionManager::createMenu(Constants::M_TOOLS_DEBUG);
mtoolsdebug->menu()->setTitle(tr("Debug %1").arg(Constants::IDE_DISPLAY_NAME));
mtoolsdebug->menu()->setTitle(Tr::tr("Debug %1").arg(Constants::IDE_DISPLAY_NAME));
mtools->addMenu(mtoolsdebug, Constants::G_TOOLS_DEBUG);
m_loggerAction = new QAction(tr("Show Logs..."), this);
m_loggerAction = new QAction(Tr::tr("Show Logs..."), this);
cmd = ActionManager::registerAction(m_loggerAction, Constants::LOGGER);
mtoolsdebug->addAction(cmd);
connect(m_loggerAction, &QAction::triggered, this, [] { LoggingViewer::showLoggingView(); });
@@ -765,7 +766,7 @@ void MainWindow::registerDefaultActions()
medit->appendGroup(Constants::G_EDIT_PREFERENCES);
medit->addSeparator(Constants::G_EDIT_PREFERENCES);
m_optionsAction = new QAction(tr("Pr&eferences..."), this);
m_optionsAction = new QAction(Tr::tr("Pr&eferences..."), this);
m_optionsAction->setMenuRole(QAction::PreferencesRole);
cmd = ActionManager::registerAction(m_optionsAction, Constants::OPTIONS);
cmd->setDefaultKeySequence(QKeySequence::Preferences);
@@ -776,25 +777,25 @@ void MainWindow::registerDefaultActions()
if (useMacShortcuts) {
// Minimize Action
QAction *minimizeAction = new QAction(tr("Minimize"), this);
QAction *minimizeAction = new QAction(Tr::tr("Minimize"), this);
minimizeAction->setEnabled(false); // actual implementation in WindowSupport
cmd = ActionManager::registerAction(minimizeAction, Constants::MINIMIZE_WINDOW);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+M")));
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
// Zoom Action
QAction *zoomAction = new QAction(tr("Zoom"), this);
QAction *zoomAction = new QAction(Tr::tr("Zoom"), this);
zoomAction->setEnabled(false); // actual implementation in WindowSupport
cmd = ActionManager::registerAction(zoomAction, Constants::ZOOM_WINDOW);
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
}
// Full Screen Action
QAction *toggleFullScreenAction = new QAction(tr("Full Screen"), this);
QAction *toggleFullScreenAction = new QAction(Tr::tr("Full Screen"), this);
toggleFullScreenAction->setCheckable(!HostOsInfo::isMacHost());
toggleFullScreenAction->setEnabled(false); // actual implementation in WindowSupport
cmd = ActionManager::registerAction(toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Meta+F") : tr("Ctrl+Shift+F11")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+F") : Tr::tr("Ctrl+Shift+F11")));
if (HostOsInfo::isMacHost())
cmd->setAttribute(Command::CA_UpdateText);
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
@@ -802,10 +803,10 @@ void MainWindow::registerDefaultActions()
if (useMacShortcuts) {
mwindow->addSeparator(Constants::G_WINDOW_SIZE);
QAction *closeAction = new QAction(tr("Close Window"), this);
QAction *closeAction = new QAction(Tr::tr("Close Window"), this);
closeAction->setEnabled(false);
cmd = ActionManager::registerAction(closeAction, Constants::CLOSE_WINDOW);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Meta+W")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Meta+W")));
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
mwindow->addSeparator(Constants::G_WINDOW_SIZE);
@@ -818,7 +819,7 @@ void MainWindow::registerDefaultActions()
m_toggleLeftSideBarAction->setCheckable(true);
cmd = ActionManager::registerAction(m_toggleLeftSideBarAction, Constants::TOGGLE_LEFT_SIDEBAR);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+0") : tr("Alt+0")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+0") : Tr::tr("Alt+0")));
connect(m_toggleLeftSideBarAction, &QAction::triggered,
this, [this](bool visible) { setSidebarVisible(visible, Side::Left); });
ProxyAction *toggleLeftSideBarProxyAction =
@@ -834,7 +835,7 @@ void MainWindow::registerDefaultActions()
m_toggleRightSideBarAction->setCheckable(true);
cmd = ActionManager::registerAction(m_toggleRightSideBarAction, Constants::TOGGLE_RIGHT_SIDEBAR);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+0") : tr("Alt+Shift+0")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+0") : Tr::tr("Alt+Shift+0")));
connect(m_toggleRightSideBarAction, &QAction::triggered,
this, [this](bool visible) { setSidebarVisible(visible, Side::Right); });
ProxyAction *toggleRightSideBarProxyAction =
@@ -848,7 +849,7 @@ void MainWindow::registerDefaultActions()
// Window->Views
ActionContainer *mviews = ActionManager::createMenu(Constants::M_VIEW_VIEWS);
mview->addMenu(mviews, Constants::G_VIEW_VIEWS);
mviews->menu()->setTitle(tr("&Views"));
mviews->menu()->setTitle(Tr::tr("&Views"));
// "Help" separators
mhelp->addSeparator(Constants::G_HELP_SUPPORT);
@@ -858,9 +859,9 @@ void MainWindow::registerDefaultActions()
// About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about"));
if (HostOsInfo::isMacHost())
tmpaction = new QAction(icon, tr("About &%1").arg(Constants::IDE_DISPLAY_NAME), this); // it's convention not to add dots to the about menu
tmpaction = new QAction(icon, Tr::tr("About &%1").arg(Constants::IDE_DISPLAY_NAME), this); // it's convention not to add dots to the about menu
else
tmpaction = new QAction(icon, tr("About &%1...").arg(Constants::IDE_DISPLAY_NAME), this);
tmpaction = new QAction(icon, Tr::tr("About &%1...").arg(Constants::IDE_DISPLAY_NAME), this);
tmpaction->setMenuRole(QAction::AboutRole);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_QTCREATOR);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
@@ -868,21 +869,21 @@ void MainWindow::registerDefaultActions()
connect(tmpaction, &QAction::triggered, this, &MainWindow::aboutQtCreator);
//About Plugins Action
tmpaction = new QAction(tr("About &Plugins..."), this);
tmpaction = new QAction(Tr::tr("About &Plugins..."), this);
tmpaction->setMenuRole(QAction::ApplicationSpecificRole);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_PLUGINS);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
connect(tmpaction, &QAction::triggered, this, &MainWindow::aboutPlugins);
// About Qt Action
// tmpaction = new QAction(tr("About &Qt..."), this);
// tmpaction = new QAction(Tr::tr("About &Qt..."), this);
// cmd = ActionManager::registerAction(tmpaction, Constants:: ABOUT_QT);
// mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
// tmpaction->setEnabled(true);
// connect(tmpaction, &QAction::triggered, qApp, &QApplication::aboutQt);
// Change Log Action
tmpaction = new QAction(tr("Change Log..."), this);
tmpaction = new QAction(Tr::tr("Change Log..."), this);
tmpaction->setMenuRole(QAction::ApplicationSpecificRole);
cmd = ActionManager::registerAction(tmpaction, Constants::CHANGE_LOG);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
@@ -890,7 +891,7 @@ void MainWindow::registerDefaultActions()
connect(tmpaction, &QAction::triggered, this, &MainWindow::changeLog);
// Contact
tmpaction = new QAction(tr("Contact..."), this);
tmpaction = new QAction(Tr::tr("Contact..."), this);
cmd = ActionManager::registerAction(tmpaction, "QtCreator.Contact");
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
@@ -910,7 +911,7 @@ void MainWindow::registerModeSelectorStyleActions()
ActionContainer *mview = ActionManager::actionContainer(Constants::M_VIEW);
// Cycle Mode Selector Styles
m_cycleModeSelectorStyleAction = new QAction(tr("Cycle Mode Selector Styles"), this);
m_cycleModeSelectorStyleAction = new QAction(Tr::tr("Cycle Mode Selector Styles"), this);
ActionManager::registerAction(m_cycleModeSelectorStyleAction, Constants::CYCLE_MODE_SELECTOR_STYLE);
connect(m_cycleModeSelectorStyleAction, &QAction::triggered, this, [this] {
ModeManager::cycleModeStyle();
@@ -921,19 +922,19 @@ void MainWindow::registerModeSelectorStyleActions()
ActionContainer *mmodeLayouts = ActionManager::createMenu(Constants::M_VIEW_MODESTYLES);
mview->addMenu(mmodeLayouts, Constants::G_VIEW_VIEWS);
QMenu *styleMenu = mmodeLayouts->menu();
styleMenu->setTitle(tr("Mode Selector Style"));
styleMenu->setTitle(Tr::tr("Mode Selector Style"));
auto *stylesGroup = new QActionGroup(styleMenu);
stylesGroup->setExclusive(true);
m_setModeSelectorStyleIconsAndTextAction = stylesGroup->addAction(tr("Icons and Text"));
m_setModeSelectorStyleIconsAndTextAction = stylesGroup->addAction(Tr::tr("Icons and Text"));
connect(m_setModeSelectorStyleIconsAndTextAction, &QAction::triggered,
[] { ModeManager::setModeStyle(ModeManager::Style::IconsAndText); });
m_setModeSelectorStyleIconsAndTextAction->setCheckable(true);
m_setModeSelectorStyleIconsOnlyAction = stylesGroup->addAction(tr("Icons Only"));
m_setModeSelectorStyleIconsOnlyAction = stylesGroup->addAction(Tr::tr("Icons Only"));
connect(m_setModeSelectorStyleIconsOnlyAction, &QAction::triggered,
[] { ModeManager::setModeStyle(ModeManager::Style::IconsOnly); });
m_setModeSelectorStyleIconsOnlyAction->setCheckable(true);
m_setModeSelectorStyleHiddenAction = stylesGroup->addAction(tr("Hidden"));
m_setModeSelectorStyleHiddenAction = stylesGroup->addAction(Tr::tr("Hidden"));
connect(m_setModeSelectorStyleHiddenAction, &QAction::triggered,
[] { ModeManager::setModeStyle(ModeManager::Style::Hidden); });
m_setModeSelectorStyleHiddenAction->setCheckable(true);
@@ -1464,7 +1465,7 @@ void MainWindow::changeLog()
versionCombo->addItem(f.first.toString());
dialog = new LogDialog(ICore::dialogParent());
auto versionLayout = new QHBoxLayout;
versionLayout->addWidget(new QLabel(tr("Version:")));
versionLayout->addWidget(new QLabel(Tr::tr("Version:")));
versionLayout->addWidget(versionCombo);
versionLayout->addStretch(1);
auto showInExplorer = new QPushButton(FileUtils::msgGraphicalShellAction());
@@ -1496,7 +1497,7 @@ void MainWindow::changeLog()
dialogLayout->addWidget(buttonBox);
dialog->setLayout(dialogLayout);
dialog->resize(700, 600);
dialog->setWindowTitle(tr("Change Log"));
dialog->setWindowTitle(Tr::tr("Change Log"));
dialog->setAttribute(Qt::WA_DeleteOnClose);
ICore::registerWindow(dialog, Context("CorePlugin.VersionDialog"));
@@ -1539,8 +1540,8 @@ void MainWindow::changeLog()
void MainWindow::contact()
{
QMessageBox dlg(QMessageBox::Information, tr("Contact"),
tr("<p>Qt Creator developers can be reached at the Qt Creator mailing list:</p>"
QMessageBox dlg(QMessageBox::Information, Tr::tr("Contact"),
Tr::tr("<p>Qt Creator developers can be reached at the Qt Creator mailing list:</p>"
"%1"
"<p>or the #qt-creator channel on Libera.Chat IRC:</p>"
"%2"

View File

@@ -2,11 +2,12 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "messageoutputwindow.h"
#include "outputwindow.h"
#include "icontext.h"
#include "coreconstants.h"
#include <coreplugin/icore.h>
#include "coreconstants.h"
#include "coreplugintr.h"
#include "icontext.h"
#include "outputwindow.h"
#include <utils/utilsicons.h>
#include <QFont>
@@ -66,7 +67,7 @@ QWidget *MessageOutputWindow::outputWidget(QWidget *parent)
QString MessageOutputWindow::displayName() const
{
return tr("General Messages");
return Tr::tr("General Messages");
}
void MessageOutputWindow::append(const QString &text)

View File

@@ -3,6 +3,7 @@
#include "mimetypemagicdialog.h"
#include "coreplugintr.h"
#include "icore.h"
#include <utils/headerviewstretcher.h>
@@ -27,10 +28,10 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
QDialog(parent)
{
resize(582, 419);
setWindowTitle(tr("Add Magic Header"));
setWindowTitle(Tr::tr("Add Magic Header"));
auto informationLabel = new QLabel;
informationLabel->setText(tr("<html><head/><body><p>MIME magic data is interpreted as defined "
informationLabel->setText(Tr::tr("<html><head/><body><p>MIME magic data is interpreted as defined "
"by the Shared MIME-info Database specification from "
"<a href=\"http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html\">"
"freedesktop.org</a>.<hr/></p></body></html>")); // FIXME: Simplify for translators
@@ -39,31 +40,31 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
m_valueLineEdit = new QLineEdit;
m_typeSelector = new QComboBox;
m_typeSelector->addItem(tr("String"));
m_typeSelector->addItem(tr("RegExp"));
m_typeSelector->addItem(tr("Host16"));
m_typeSelector->addItem(tr("Host32"));
m_typeSelector->addItem(tr("Big16"));
m_typeSelector->addItem(tr("Big32"));
m_typeSelector->addItem(tr("Little16"));
m_typeSelector->addItem(tr("Little32"));
m_typeSelector->addItem(tr("Byte"));
m_typeSelector->addItem(Tr::tr("String"));
m_typeSelector->addItem(Tr::tr("RegExp"));
m_typeSelector->addItem(Tr::tr("Host16"));
m_typeSelector->addItem(Tr::tr("Host32"));
m_typeSelector->addItem(Tr::tr("Big16"));
m_typeSelector->addItem(Tr::tr("Big32"));
m_typeSelector->addItem(Tr::tr("Little16"));
m_typeSelector->addItem(Tr::tr("Little32"));
m_typeSelector->addItem(Tr::tr("Byte"));
m_maskLineEdit = new QLineEdit;
m_useRecommendedGroupBox = new QGroupBox(tr("Use Recommended"));
m_useRecommendedGroupBox = new QGroupBox(Tr::tr("Use Recommended"));
m_useRecommendedGroupBox->setCheckable(true);
m_noteLabel = new QLabel(tr("<html><head/><body><p><span style=\" font-style:italic;\">"
m_noteLabel = new QLabel(Tr::tr("<html><head/><body><p><span style=\" font-style:italic;\">"
"Note: Wide range values might impact performance when opening "
"files.</span></p></body></html>"));
m_noteLabel->setTextFormat(Qt::RichText);
m_startRangeLabel = new QLabel(tr("Range start:"));
m_startRangeLabel = new QLabel(Tr::tr("Range start:"));
m_endRangeLabel = new QLabel(tr("Range end:"));
m_endRangeLabel = new QLabel(Tr::tr("Range end:"));
m_priorityLabel = new QLabel(tr("Priority:"));
m_priorityLabel = new QLabel(Tr::tr("Priority:"));
m_prioritySpinBox = new QSpinBox(m_useRecommendedGroupBox);
m_prioritySpinBox->setMinimum(1);
@@ -91,9 +92,9 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
Column {
informationLabel,
Form {
tr("Value:"), m_valueLineEdit, br,
tr("Type:"), m_typeSelector, st, br,
tr("Mask:"), m_maskLineEdit, br
Tr::tr("Value:"), m_valueLineEdit, br,
Tr::tr("Type:"), m_typeSelector, st, br,
Tr::tr("Mask:"), m_maskLineEdit, br
},
m_useRecommendedGroupBox,
st,
@@ -155,7 +156,7 @@ void MimeTypeMagicDialog::validateAccept()
if (rule.isValid())
accept();
else
QMessageBox::critical(ICore::dialogParent(), tr("Error"), errorMessage);
QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"), errorMessage);
}
void MimeTypeMagicDialog::setMagicData(const MagicData &data)
@@ -211,7 +212,7 @@ MimeMagicRule MimeTypeMagicDialog::createRule(QString *errorMessage) const
errorMessage);
if (type == MimeMagicRule::Invalid) {
if (errorMessage)
*errorMessage = tr("Internal error: Type is invalid");
*errorMessage = Tr::tr("Internal error: Type is invalid");
}
return rule;
}

View File

@@ -44,7 +44,6 @@ public:
class MimeTypeMagicDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::MimeTypeMagicDialog)
public:
explicit MimeTypeMagicDialog(QWidget *parent = nullptr);

View File

@@ -4,14 +4,12 @@
#include "mimetypesettings.h"
#include "coreconstants.h"
#include "coreplugintr.h"
#include "editormanager/ieditorfactory.h"
#include "editormanager/ieditorfactory_p.h"
#include "icore.h"
#include "mimetypemagicdialog.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/ieditorfactory_p.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <utils/algorithm.h>
#include <utils/fancylineedit.h>
#include <utils/headerviewstretcher.h>
@@ -21,7 +19,6 @@
#include <utils/stringutils.h>
#include <QAbstractTableModel>
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QFile>
@@ -130,9 +127,9 @@ QVariant MimeTypeSettingsModel::headerData(int section, Qt::Orientation orientat
return QVariant();
if (section == 0)
return tr("MIME Type");
return Tr::tr("MIME Type");
else
return tr("Handler");
return Tr::tr("Handler");
}
QVariant MimeTypeSettingsModel::data(const QModelIndex &modelIndex, int role) const
@@ -308,45 +305,45 @@ void MimeTypeSettingsPrivate::configureUi(QWidget *w)
m_mimeTypesTreeView->setUniformRowHeights(true);
auto resetButton = new QPushButton;
resetButton->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset all MIME type definitions to their defaults.", nullptr));
resetButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset MIME Types", nullptr));
resetButton->setToolTip(Tr::tr("Reset all MIME type definitions to their defaults."));
resetButton->setText(Tr::tr("Reset MIME Types"));
m_resetHandlersButton = new QPushButton;
m_resetHandlersButton->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset the assigned handler for all MIME type definitions to the default.", nullptr));
m_resetHandlersButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Reset Handlers", nullptr));
m_resetHandlersButton->setToolTip(Tr::tr("Reset the assigned handler for all MIME type definitions to the default."));
m_resetHandlersButton->setText(Tr::tr("Reset Handlers"));
auto patternsLabel = new QLabel;
patternsLabel->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Patterns:", nullptr));
patternsLabel->setText(Tr::tr("Patterns:"));
m_patternsLineEdit = new QLineEdit;
m_patternsLineEdit->setObjectName("patternsLineEdit");
m_patternsLineEdit->setToolTip(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "A semicolon-separated list of wildcarded file names.", nullptr));
m_patternsLineEdit->setToolTip(Tr::tr("A semicolon-separated list of wildcarded file names."));
m_magicHeadersTreeWidget = new QTreeWidget;
m_magicHeadersTreeWidget->setHeaderItem(new QTreeWidgetItem({
QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Magic Header"),
QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Type"),
QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Range"),
QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Priority")
Tr::tr("Magic Header"),
Tr::tr("Type"),
Tr::tr("Range"),
Tr::tr("Priority")
}));
m_magicHeadersTreeWidget->setRootIsDecorated(false);
m_magicHeadersTreeWidget->setUniformRowHeights(true);
m_magicHeadersTreeWidget->setColumnCount(4);
m_addMagicButton = new QPushButton;
m_addMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Add...", nullptr));
m_addMagicButton->setText(Tr::tr("Add..."));
m_editMagicButton = new QPushButton;
m_editMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Edit...", nullptr));
m_editMagicButton->setText(Tr::tr("Edit..."));
m_removeMagicButton = new QPushButton;
m_removeMagicButton->setText(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Remove", nullptr));
m_removeMagicButton->setText(Tr::tr("Remove"));
auto mimeTypesGroupBox = new QGroupBox;
mimeTypesGroupBox->setTitle(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Registered MIME Types", nullptr));
mimeTypesGroupBox->setTitle(Tr::tr("Registered MIME Types"));
auto detailsGroupBox = new QGroupBox;
detailsGroupBox->setTitle(QCoreApplication::translate("Core::Internal::MimeTypeSettingsPage", "Details", nullptr));
detailsGroupBox->setTitle(Tr::tr("Details"));
auto splitter = new QSplitter(w);
splitter->setOrientation(Qt::Vertical);
@@ -556,8 +553,8 @@ void MimeTypeSettingsPrivate::resetMimeTypes()
m_pendingModifiedMimeTypes.clear();
m_userModifiedMimeTypes.clear(); // settings file will be removed with next settings-save
QMessageBox::information(ICore::dialogParent(),
tr("Reset MIME Types"),
tr("Changes will take effect after restart."));
Tr::tr("Reset MIME Types"),
Tr::tr("Changes will take effect after restart."));
}
void MimeTypeSettingsPrivate::setFilterPattern(const QString &pattern)
@@ -714,7 +711,7 @@ MimeTypeSettings::MimeTypeSettings()
: d(new MimeTypeSettingsPrivate)
{
setId(Constants::SETTINGS_ID_MIMETYPES);
setDisplayName(tr("MIME Types"));
setDisplayName(Tr::tr("MIME Types"));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
}

View File

@@ -3,16 +3,15 @@
#include "modemanager.h"
#include "fancytabwidget.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "coreplugintr.h"
#include "fancyactionbar.h"
#include "fancytabwidget.h"
#include "icore.h"
#include "imode.h"
#include "mainwindow.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/imode.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
@@ -214,7 +213,7 @@ void ModeManagerPrivate::appendMode(IMode *mode)
// Register mode shortcut
const Id actionId = mode->id().withPrefix("QtCreator.Mode.");
QAction *action = new QAction(ModeManager::tr("Switch to <b>%1</b> mode").arg(mode->displayName()), m_instance);
QAction *action = new QAction(Tr::tr("Switch to <b>%1</b> mode").arg(mode->displayName()), m_instance);
Command *cmd = ActionManager::registerAction(action, actionId);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString("Meta+%1").arg(index + 1)
: QString("Ctrl+%1").arg(index + 1)));

View File

@@ -2,19 +2,17 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "navigationsubwidget.h"
#include "navigationwidget.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "coreplugintr.h"
#include "icore.h"
#include "inavigationwidgetfactory.h"
#include <coreplugin/icore.h>
#include "navigationwidget.h"
#include <utils/styledbar.h>
#include <utils/utilsicons.h>
#include <QDebug>
#include <QHBoxLayout>
#include <QMenu>
#include <QResizeEvent>
@@ -53,7 +51,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
auto splitAction = new QToolButton();
splitAction->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon());
splitAction->setToolTip(tr("Split"));
splitAction->setToolTip(Tr::tr("Split"));
splitAction->setPopupMode(QToolButton::InstantPopup);
splitAction->setProperty("noArrow", true);
m_splitMenu = new QMenu(splitAction);
@@ -62,7 +60,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
m_closeButton = new QToolButton();
m_closeButton->setIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon());
m_closeButton->setToolTip(tr("Close"));
m_closeButton->setToolTip(Tr::tr("Close"));
toolBarLayout->addWidget(splitAction);
toolBarLayout->addWidget(m_closeButton);
@@ -220,7 +218,7 @@ bool CommandComboBox::event(QEvent *e)
if (e->type() == QEvent::ToolTip) {
const QString text = currentText();
if (const Core::Command *cmd = command(text)) {
const QString tooltip = tr("Activate %1 View").arg(text);
const QString tooltip = Tr::tr("Activate %1 View").arg(text);
setToolTip(cmd->stringWithAppendedShortcut(tooltip));
} else {
setToolTip(text);

View File

@@ -228,7 +228,7 @@ void NavigationWidget::setFactories(const QList<INavigationWidgetFactory *> &fac
const Id actionId = id.withPrefix("QtCreator.Sidebar.");
if (!ActionManager::command(actionId)) {
QAction *action = new QAction(tr("Activate %1 View").arg(factory->displayName()), this);
QAction *action = new QAction(Tr::tr("Activate %1 View").arg(factory->displayName()), this);
d->m_actionMap.insert(action, id);
connect(action, &QAction::triggered, this, [this, action] {
NavigationWidget::activateSubWidget(d->m_actionMap[action], Side::Left);

View File

@@ -2,22 +2,22 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "outputpanemanager.h"
#include "outputpane.h"
#include "findplaceholder.h"
#include "actionmanager/actioncontainer.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
#include "actionmanager/commandbutton.h"
#include "coreplugintr.h"
#include "editormanager/editormanager.h"
#include "editormanager/ieditor.h"
#include "find/optionspopup.h"
#include "findplaceholder.h"
#include "icore.h"
#include "ioutputpane.h"
#include "modemanager.h"
#include "outputpane.h"
#include "statusbarmanager.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/commandbutton.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/find/optionspopup.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/styledbar.h>
@@ -27,11 +27,10 @@
#include <utils/theme/theme.h>
#include <utils/utilsicons.h>
#include <QDebug>
#include <QAction>
#include <QApplication>
#include <QComboBox>
#include <QDebug>
#include <QFocusEvent>
#include <QHBoxLayout>
#include <QLabel>
@@ -122,27 +121,27 @@ void IOutputPane::setupFilterUi(const QString &historyKey)
m_filterOutputLineEdit = new FancyLineEdit;
m_filterActionRegexp = new QAction(this);
m_filterActionRegexp->setCheckable(true);
m_filterActionRegexp->setText(tr("Use Regular Expressions"));
m_filterActionRegexp->setText(Tr::tr("Use Regular Expressions"));
connect(m_filterActionRegexp, &QAction::toggled, this, &IOutputPane::setRegularExpressions);
Core::ActionManager::registerAction(m_filterActionRegexp, filterRegexpActionId());
m_filterActionCaseSensitive = new QAction(this);
m_filterActionCaseSensitive->setCheckable(true);
m_filterActionCaseSensitive->setText(tr("Case Sensitive"));
m_filterActionCaseSensitive->setText(Tr::tr("Case Sensitive"));
connect(m_filterActionCaseSensitive, &QAction::toggled, this, &IOutputPane::setCaseSensitive);
Core::ActionManager::registerAction(m_filterActionCaseSensitive,
filterCaseSensitivityActionId());
m_invertFilterAction = new QAction(this);
m_invertFilterAction->setCheckable(true);
m_invertFilterAction->setText(tr("Show Non-matching Lines"));
m_invertFilterAction->setText(Tr::tr("Show Non-matching Lines"));
connect(m_invertFilterAction, &QAction::toggled, this, [this] {
m_invertFilter = m_invertFilterAction->isChecked();
updateFilter();
});
Core::ActionManager::registerAction(m_invertFilterAction, filterInvertedActionId());
m_filterOutputLineEdit->setPlaceholderText(tr("Filter output..."));
m_filterOutputLineEdit->setPlaceholderText(Tr::tr("Filter output..."));
m_filterOutputLineEdit->setButtonVisible(FancyLineEdit::Left, true);
m_filterOutputLineEdit->setButtonIcon(FancyLineEdit::Left, Icons::MAGNIFIER.icon());
m_filterOutputLineEdit->setFiltering(true);
@@ -281,10 +280,10 @@ void OutputPaneManager::updateMaximizeButton(bool maximized)
{
if (maximized) {
m_instance->m_minMaxAction->setIcon(m_instance->m_minimizeIcon);
m_instance->m_minMaxAction->setText(tr("Minimize"));
m_instance->m_minMaxAction->setText(Tr::tr("Minimize"));
} else {
m_instance->m_minMaxAction->setIcon(m_instance->m_maximizeIcon);
m_instance->m_minMaxAction->setText(tr("Maximize"));
m_instance->m_minMaxAction->setText(Tr::tr("Maximize"));
}
}
@@ -309,28 +308,28 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_minimizeIcon(Utils::Icons::ARROW_DOWN.icon()),
m_maximizeIcon(Utils::Icons::ARROW_UP.icon())
{
setWindowTitle(tr("Output"));
setWindowTitle(Tr::tr("Output"));
m_titleLabel->setContentsMargins(5, 0, 5, 0);
m_clearAction = new QAction(this);
m_clearAction->setIcon(Utils::Icons::CLEAN.icon());
m_clearAction->setText(tr("Clear"));
m_clearAction->setText(Tr::tr("Clear"));
connect(m_clearAction, &QAction::triggered, this, &OutputPaneManager::clearPage);
m_nextAction = new QAction(this);
m_nextAction->setIcon(Utils::Icons::ARROW_DOWN_TOOLBAR.icon());
m_nextAction->setText(tr("Next Item"));
m_nextAction->setText(Tr::tr("Next Item"));
connect(m_nextAction, &QAction::triggered, this, &OutputPaneManager::slotNext);
m_prevAction = new QAction(this);
m_prevAction->setIcon(Utils::Icons::ARROW_UP_TOOLBAR.icon());
m_prevAction->setText(tr("Previous Item"));
m_prevAction->setText(Tr::tr("Previous Item"));
connect(m_prevAction, &QAction::triggered, this, &OutputPaneManager::slotPrev);
m_minMaxAction = new QAction(this);
m_minMaxAction->setIcon(m_maximizeIcon);
m_minMaxAction->setText(tr("Maximize"));
m_minMaxAction->setText(Tr::tr("Maximize"));
m_closeButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeButton, &QAbstractButton::clicked, this, &OutputPaneManager::slotHide);
@@ -374,7 +373,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
// Window->Output Panes
ActionContainer *mpanes = ActionManager::createMenu(Constants::M_VIEW_PANES);
mview->addMenu(mpanes, Constants::G_VIEW_PANES);
mpanes->menu()->setTitle(tr("Out&put"));
mpanes->menu()->setTitle(Tr::tr("Out&put"));
mpanes->appendGroup("Coreplugin.OutputPane.ActionsGroup");
mpanes->appendGroup("Coreplugin.OutputPane.PanesGroup");
@@ -386,7 +385,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
cmd = ActionManager::registerAction(m_prevAction, "Coreplugin.OutputPane.previtem");
cmd->setDefaultKeySequence(QKeySequence(tr("Shift+F6")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Shift+F6")));
m_prevToolButton->setDefaultAction(
ProxyAction::proxyActionWithIcon(m_prevAction, Utils::Icons::ARROW_UP_TOOLBAR.icon()));
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
@@ -394,11 +393,11 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
cmd = ActionManager::registerAction(m_nextAction, "Coreplugin.OutputPane.nextitem");
m_nextToolButton->setDefaultAction(
ProxyAction::proxyActionWithIcon(m_nextAction, Utils::Icons::ARROW_DOWN_TOOLBAR.icon()));
cmd->setDefaultKeySequence(QKeySequence(tr("F6")));
cmd->setDefaultKeySequence(QKeySequence(Tr::tr("F6")));
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
cmd = ActionManager::registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax");
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+9") : tr("Alt+Shift+9")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Shift+9") : Tr::tr("Alt+Shift+9")));
cmd->setAttribute(Command::CA_UpdateText);
cmd->setAttribute(Command::CA_UpdateIcon);
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");

View File

@@ -6,11 +6,13 @@
#include "actionmanager/actionmanager.h"
#include "coreconstants.h"
#include "coreplugin.h"
#include "coreplugintr.h"
#include "editormanager/editormanager.h"
#include "find/basetextfind.h"
#include "icore.h"
#include <aggregation/aggregate.h>
#include <utils/outputformatter.h>
#include <utils/qtcassert.h>
@@ -411,7 +413,7 @@ void OutputWindow::handleOutputChunk(const QString &output, OutputFormat format)
const int elided = out.size() - d->maxCharCount;
out = out.left(d->maxCharCount / 2)
+ "[[[... "
+ tr("Elided %n characters due to Application Output settings", nullptr, elided)
+ Tr::tr("Elided %n characters due to Application Output settings", nullptr, elided)
+ " ...]]]"
+ out.right(d->maxCharCount / 2);
setMaximumBlockCount(out.count('\n') + 1);
@@ -565,7 +567,7 @@ void OutputWindow::reset()
d->scrollToBottom = true;
if (!d->queuedOutput.isEmpty()) {
d->queuedOutput.clear();
d->formatter.appendMessage(tr("[Discarding excessive amount of pending output.]\n"),
d->formatter.appendMessage(Tr::tr("[Discarding excessive amount of pending output.]\n"),
ErrorMessageFormat);
}
d->flushRequested = false;

View File

@@ -3,9 +3,9 @@
#include "plugindialog.h"
#include "icore.h"
#include "coreplugintr.h"
#include "dialogs/restartdialog.h"
#include "icore.h"
#include "plugininstallwizard.h"
#include <app/app_version.h>
@@ -19,7 +19,6 @@
#include <utils/fancylineedit.h>
#include <QCheckBox>
#include <QDebug>
#include <QDialog>
#include <QDialogButtonBox>
#include <QHBoxLayout>
@@ -48,9 +47,9 @@ PluginDialog::PluginDialog(QWidget *parent)
vl->addWidget(m_view);
m_detailsButton = new QPushButton(tr("Details"), this);
m_errorDetailsButton = new QPushButton(tr("Error Details"), this);
m_installButton = new QPushButton(tr("Install Plugin..."), this);
m_detailsButton = new QPushButton(Tr::tr("Details"), this);
m_errorDetailsButton = new QPushButton(Tr::tr("Error Details"), this);
m_installButton = new QPushButton(Tr::tr("Install Plugin..."), this);
m_detailsButton->setEnabled(false);
m_errorDetailsButton->setEnabled(false);
@@ -61,7 +60,7 @@ PluginDialog::PluginDialog(QWidget *parent)
vl->addWidget(buttonBox);
resize(650, 400);
setWindowTitle(tr("Installed Plugins"));
setWindowTitle(Tr::tr("Installed Plugins"));
connect(m_view, &ExtensionSystem::PluginView::currentPluginChanged,
this, &PluginDialog::updateButtons);
@@ -86,7 +85,7 @@ void PluginDialog::closeDialog()
ExtensionSystem::PluginManager::writeSettings();
if (m_isRestartRequired) {
RestartDialog restartDialog(ICore::dialogParent(),
tr("Plugin changes will take effect after restart."));
Tr::tr("Plugin changes will take effect after restart."));
restartDialog.exec();
}
accept();
@@ -115,7 +114,7 @@ void PluginDialog::openDetails(ExtensionSystem::PluginSpec *spec)
if (!spec)
return;
QDialog dialog(this);
dialog.setWindowTitle(tr("Plugin Details of %1").arg(spec->name()));
dialog.setWindowTitle(Tr::tr("Plugin Details of %1").arg(spec->name()));
auto layout = new QVBoxLayout;
dialog.setLayout(layout);
auto details = new ExtensionSystem::PluginDetailsView(&dialog);
@@ -135,7 +134,7 @@ void PluginDialog::openErrorDetails()
if (!spec)
return;
QDialog dialog(this);
dialog.setWindowTitle(tr("Plugin Errors of %1").arg(spec->name()));
dialog.setWindowTitle(Tr::tr("Plugin Errors of %1").arg(spec->name()));
auto layout = new QVBoxLayout;
dialog.setLayout(layout);
auto errors = new ExtensionSystem::PluginErrorView(&dialog);

View File

@@ -4,6 +4,7 @@
#include "plugininstallwizard.h"
#include "coreplugin.h"
#include "coreplugintr.h"
#include "icore.h"
#include <extensionsystem/pluginspec.h>
@@ -77,14 +78,13 @@ public:
: WizardPage(parent)
, m_data(data)
{
setTitle(PluginInstallWizard::tr("Source"));
setTitle(Tr::tr("Source"));
auto vlayout = new QVBoxLayout;
setLayout(vlayout);
auto label = new QLabel(
"<p>"
+ PluginInstallWizard::tr(
"Choose source location. This can be a plugin library file or a zip file.")
+ Tr::tr("Choose source location. This can be a plugin library file or a zip file.")
+ "</p>");
label->setWordWrap(true);
vlayout->addWidget(label);
@@ -113,7 +113,7 @@ public:
{
const FilePath path = m_data->sourcePath;
if (!QFile::exists(path.toString())) {
m_info->setText(PluginInstallWizard::tr("File does not exist."));
m_info->setText(Tr::tr("File does not exist."));
return false;
}
if (hasLibSuffix(path))
@@ -151,14 +151,14 @@ public:
: WizardPage(parent)
, m_data(data)
{
setTitle(PluginInstallWizard::tr("Check Archive"));
setTitle(Tr::tr("Check Archive"));
auto vlayout = new QVBoxLayout;
setLayout(vlayout);
m_label = new InfoLabel;
m_label->setElideMode(Qt::ElideNone);
m_label->setWordWrap(true);
m_cancelButton = new QPushButton(PluginInstallWizard::tr("Cancel"));
m_cancelButton = new QPushButton(Tr::tr("Cancel"));
m_output = new QTextEdit;
m_output->setReadOnly(true);
@@ -179,7 +179,7 @@ public:
m_tempDir = std::make_unique<TemporaryDirectory>("plugininstall");
m_data->extractedPath = m_tempDir->path();
m_label->setText(PluginInstallWizard::tr("Checking archive..."));
m_label->setText(Tr::tr("Checking archive..."));
m_label->setType(InfoLabel::None);
m_cancelButton->setVisible(true);
@@ -188,7 +188,7 @@ public:
m_archive.reset(new Archive(m_data->sourcePath, m_tempDir->path()));
if (!m_archive->isValid()) {
m_label->setType(InfoLabel::Error);
m_label->setText(PluginInstallWizard::tr("The file is not an archive."));
m_label->setText(Tr::tr("The file is not an archive."));
return;
}
QObject::connect(m_archive.get(), &Archive::outputReceived, this,
@@ -214,11 +214,10 @@ public:
m_cancelButton->setVisible(false);
if (m_canceled) {
m_label->setType(InfoLabel::Information);
m_label->setText(PluginInstallWizard::tr("Canceled."));
m_label->setText(Tr::tr("Canceled."));
} else {
m_label->setType(InfoLabel::Error);
m_label->setText(
PluginInstallWizard::tr("There was an error while unarchiving."));
m_label->setText(Tr::tr("There was an error while unarchiving."));
}
} else { // unarchiving was successful, run a check
m_archiveCheck = Utils::runAsync(
@@ -229,10 +228,10 @@ public:
const bool ok = f.resultCount() == 0 && !f.isCanceled();
if (f.isCanceled()) {
m_label->setType(InfoLabel::Information);
m_label->setText(PluginInstallWizard::tr("Canceled."));
m_label->setText(Tr::tr("Canceled."));
} else if (ok) {
m_label->setType(InfoLabel::Ok);
m_label->setText(PluginInstallWizard::tr("Archive is OK."));
m_label->setText(Tr::tr("Archive is OK."));
} else {
const ArchiveIssue issue = f.result();
m_label->setType(issue.type);
@@ -275,8 +274,7 @@ public:
});
if (found != dependencies.constEnd()) {
if (!coreplugin->provides(found->name, found->version)) {
fi.reportResult({PluginInstallWizard::tr(
"Plugin requires an incompatible version of %1 (%2).")
fi.reportResult({Tr::tr("Plugin requires an incompatible version of %1 (%2).")
.arg(Constants::IDE_DISPLAY_NAME)
.arg(found->version),
InfoLabel::Error});
@@ -286,9 +284,8 @@ public:
return; // successful / no error
}
}
fi.reportResult(
{PluginInstallWizard::tr("Did not find %1 plugin.").arg(Constants::IDE_DISPLAY_NAME),
InfoLabel::Error});
fi.reportResult({Tr::tr("Did not find %1 plugin.").arg(Constants::IDE_DISPLAY_NAME),
InfoLabel::Error});
}
void cleanupPage() final
@@ -323,21 +320,19 @@ public:
: WizardPage(parent)
, m_data(data)
{
setTitle(PluginInstallWizard::tr("Install Location"));
setTitle(Tr::tr("Install Location"));
auto vlayout = new QVBoxLayout;
setLayout(vlayout);
auto label = new QLabel("<p>" + PluginInstallWizard::tr("Choose install location.")
+ "</p>");
auto label = new QLabel("<p>" + Tr::tr("Choose install location.") + "</p>");
label->setWordWrap(true);
vlayout->addWidget(label);
vlayout->addSpacing(10);
auto localInstall = new QRadioButton(PluginInstallWizard::tr("User plugins"));
auto localInstall = new QRadioButton(Tr::tr("User plugins"));
localInstall->setChecked(!m_data->installIntoApplication);
auto localLabel = new QLabel(
PluginInstallWizard::tr("The plugin will be available to all compatible %1 "
"installations, but only for the current user.")
auto localLabel = new QLabel(Tr::tr("The plugin will be available to all compatible %1 "
"installations, but only for the current user.")
.arg(Constants::IDE_DISPLAY_NAME));
localLabel->setWordWrap(true);
localLabel->setAttribute(Qt::WA_MacSmallSize, true);
@@ -347,11 +342,11 @@ public:
vlayout->addSpacing(10);
auto appInstall = new QRadioButton(
PluginInstallWizard::tr("%1 installation").arg(Constants::IDE_DISPLAY_NAME));
Tr::tr("%1 installation").arg(Constants::IDE_DISPLAY_NAME));
appInstall->setChecked(m_data->installIntoApplication);
auto appLabel = new QLabel(
PluginInstallWizard::tr("The plugin will be available only to this %1 "
"installation, but for all users that can access it.")
Tr::tr("The plugin will be available only to this %1 "
"installation, but for all users that can access it.")
.arg(Constants::IDE_DISPLAY_NAME));
appLabel->setWordWrap(true);
appLabel->setAttribute(Qt::WA_MacSmallSize, true);
@@ -377,7 +372,7 @@ public:
: WizardPage(parent)
, m_data(data)
{
setTitle(PluginInstallWizard::tr("Summary"));
setTitle(Tr::tr("Summary"));
auto vlayout = new QVBoxLayout;
setLayout(vlayout);
@@ -390,7 +385,7 @@ public:
void initializePage() final
{
m_summaryLabel->setText(
PluginInstallWizard::tr("\"%1\" will be installed into \"%2\".")
Tr::tr("\"%1\" will be installed into \"%2\".")
.arg(m_data->sourcePath.toUserOutput(),
pluginInstallPath(m_data->installIntoApplication).toUserOutput()));
}
@@ -419,13 +414,11 @@ static bool copyPluginFile(const FilePath &src, const FilePath &dest)
const FilePath destFile = dest.pathAppended(src.fileName());
if (destFile.exists()) {
QMessageBox box(QMessageBox::Question,
PluginInstallWizard::tr("Overwrite File"),
PluginInstallWizard::tr("The file \"%1\" exists. Overwrite?")
.arg(destFile.toUserOutput()),
Tr::tr("Overwrite File"),
Tr::tr("The file \"%1\" exists. Overwrite?").arg(destFile.toUserOutput()),
QMessageBox::Cancel,
ICore::dialogParent());
QPushButton *acceptButton = box.addButton(PluginInstallWizard::tr("Overwrite"),
QMessageBox::AcceptRole);
QPushButton *acceptButton = box.addButton(Tr::tr("Overwrite"), QMessageBox::AcceptRole);
box.setDefaultButton(acceptButton);
box.exec();
if (box.clickedButton() != acceptButton)
@@ -435,9 +428,8 @@ static bool copyPluginFile(const FilePath &src, const FilePath &dest)
dest.parentDir().ensureWritableDir();
if (!src.copyFile(destFile)) {
QMessageBox::warning(ICore::dialogParent(),
PluginInstallWizard::tr("Failed to Write File"),
PluginInstallWizard::tr("Failed to write file \"%1\".")
.arg(destFile.toUserOutput()));
Tr::tr("Failed to Write File"),
Tr::tr("Failed to write file \"%1\".").arg(destFile.toUserOutput()));
return false;
}
postCopyOperation()(destFile);
@@ -447,7 +439,7 @@ static bool copyPluginFile(const FilePath &src, const FilePath &dest)
bool PluginInstallWizard::exec()
{
Wizard wizard(ICore::dialogParent());
wizard.setWindowTitle(tr("Install Plugin"));
wizard.setWindowTitle(Tr::tr("Install Plugin"));
Data data;
@@ -475,7 +467,7 @@ bool PluginInstallWizard::exec()
FileUtils::CopyAskingForOverwrite(ICore::dialogParent(),
postCopyOperation()))) {
QMessageBox::warning(ICore::dialogParent(),
PluginInstallWizard::tr("Failed to Copy Plugin Files"),
Tr::tr("Failed to Copy Plugin Files"),
error);
return false;
}

View File

@@ -10,8 +10,6 @@ namespace Internal {
class PluginInstallWizard
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::PluginInstallWizard)
public:
static bool exec();
};

View File

@@ -1,17 +1,20 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "futureprogress.h"
#include "progressmanager_p.h"
#include "futureprogress.h"
#include "progressbar.h"
#include "progressview.h"
#include "../actionmanager/actionmanager.h"
#include "../actionmanager/command.h"
#include "../coreplugintr.h"
#include "../icontext.h"
#include "../icore.h"
#include "../statusbarmanager.h"
#include <extensionsystem/pluginmanager.h>
#include <utils/hostosinfo.h>
#include <utils/mathutils.h>
#include <utils/qtcassert.h>
@@ -35,10 +38,10 @@ static const char kDetailsPinned[] = "DetailsPinned";
static const bool kDetailsPinnedDefault = true;
static const int TimerInterval = 100; // 100 ms
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
namespace Core {
/*!
\class Core::ProgressManager
\inheaderfile coreplugin/progressmanager/progressmanager.h
@@ -131,7 +134,7 @@ using namespace Utils;
in a different thread, looks like this:
\code
QFuture<void> task = Utils::map(filters, &ILocatorFilter::refresh);
Core::FutureProgress *progress = Core::ProgressManager::addTask(task, tr("Indexing"),
Core::FutureProgress *progress = Core::ProgressManager::addTask(task, ::Core::Tr::tr("Indexing"),
Locator::Constants::TASK_INDEX);
\endcode
First, we to start an asynchronous operation which calls all the filters'
@@ -147,7 +150,7 @@ using namespace Utils;
// We are already running in a different thread here
QFutureInterface<void> *progressObject = new QFutureInterface<void>;
progressObject->setProgressRange(0, MAX);
Core::ProgressManager::addTask(progressObject->future(), tr("DoIt"), MYTASKTYPE);
Core::ProgressManager::addTask(progressObject->future(), ::Core::Tr::tr("DoIt"), MYTASKTYPE);
progressObject->reportStarted();
// Do something
...
@@ -289,7 +292,7 @@ void ProgressManagerPrivate::init()
m_statusBarWidget->installEventFilter(this);
StatusBarManager::addStatusBarWidget(m_statusBarWidget, StatusBarManager::RightCorner);
QAction *toggleProgressView = new QAction(tr("Toggle Progress Details"), this);
QAction *toggleProgressView = new QAction(::Core::Tr::tr("Toggle Progress Details"), this);
toggleProgressView->setCheckable(true);
toggleProgressView->setChecked(m_progressViewPinned);
toggleProgressView->setIcon(Utils::Icons::TOGGLE_PROGRESSDETAILS_TOOLBAR.icon());
@@ -784,3 +787,4 @@ void ProgressTimer::handleTimeout()
m_futureInterface.setProgressValue(progress);
}
} // Core

View File

@@ -3,13 +3,14 @@
#include "progressview.h"
#include "coreplugintr.h"
#include <QApplication>
#include <QEvent>
#include <QMouseEvent>
#include <QVBoxLayout>
using namespace Core;
using namespace Core::Internal;
namespace Core::Internal {
ProgressView::ProgressView(QWidget *parent)
: QWidget(parent)
@@ -19,7 +20,7 @@ ProgressView::ProgressView(QWidget *parent)
m_layout->setContentsMargins(0, 0, 0, 1);
m_layout->setSpacing(0);
m_layout->setSizeConstraint(QLayout::SetFixedSize);
setWindowTitle(tr("Processes"));
setWindowTitle(Tr::tr("Processes"));
}
ProgressView::~ProgressView() = default;
@@ -142,3 +143,5 @@ QPoint ProgressView::topRightReferenceInParent() const
return {};
return m_referenceWidget->mapTo(parentWidget(), m_referenceWidget->rect().topRight());
}
} // Core::Internal

View File

@@ -11,9 +11,7 @@ QT_BEGIN_NAMESPACE
class QVBoxLayout;
QT_END_NAMESPACE
namespace Core {
namespace Internal {
namespace Core::Internal {
class ProgressView : public QWidget
{
@@ -59,5 +57,4 @@ private:
bool m_hovered = false;
};
} // namespace Internal
} // namespace Core
} // Core::Internal

View File

@@ -2,6 +2,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "sidebarwidget.h"
#include "coreplugintr.h"
#include "sidebar.h"
#include "navigationsubwidget.h"
@@ -46,14 +48,14 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
spacerItem->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
m_toolbar->addWidget(spacerItem);
m_splitAction = new QAction(tr("Split"), m_toolbar);
m_splitAction->setToolTip(tr("Split"));
m_splitAction = new QAction(Tr::tr("Split"), m_toolbar);
m_splitAction->setToolTip(Tr::tr("Split"));
m_splitAction->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon());
connect(m_splitAction, &QAction::triggered, this, &SideBarWidget::splitMe);
m_toolbar->addAction(m_splitAction);
m_closeAction = new QAction(tr("Close"), m_toolbar);
m_closeAction->setToolTip(tr("Close"));
m_closeAction = new QAction(Tr::tr("Close"), m_toolbar);
m_closeAction->setToolTip(Tr::tr("Close"));
m_closeAction->setIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeAction, &QAction::triggered, this, &SideBarWidget::closeMe);
m_toolbar->addAction(m_closeAction);

View File

@@ -2,8 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "systemsettings.h"
#include "coreconstants.h"
#include "coreplugin.h"
#include "coreplugintr.h"
#include "editormanager/editormanager_p.h"
#include "dialogs/restartdialog.h"
#include "fileutils.h"
@@ -49,8 +51,8 @@ const char showCrashButtonKey[] = "ShowCrashButton";
// TODO: move to somewhere in Utils
static QString formatSize(qint64 size)
{
QStringList units {QObject::tr("Bytes"), QObject::tr("KB"), QObject::tr("MB"),
QObject::tr("GB"), QObject::tr("TB")};
QStringList units {Tr::tr("Bytes"), Tr::tr("KB"), Tr::tr("MB"),
Tr::tr("GB"), Tr::tr("TB")};
double outputSize = size;
int i;
for (i = 0; i < units.size() - 1; ++i) {
@@ -65,89 +67,87 @@ static QString formatSize(qint64 size)
class SystemSettingsWidget : public IOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Core::Internal::SystemSettings)
public:
SystemSettingsWidget()
: m_fileSystemCaseSensitivityChooser(new QComboBox)
, m_autoSuspendMinDocumentCount(new QSpinBox)
, m_externalFileBrowserEdit(new QLineEdit)
, m_autoSuspendCheckBox(new QCheckBox(tr("Auto-suspend unmodified files")))
, m_autoSuspendCheckBox(new QCheckBox(Tr::tr("Auto-suspend unmodified files")))
, m_maxRecentFilesSpinBox(new QSpinBox)
, m_enableCrashReportingCheckBox(new QCheckBox(tr("Enable crash reporting")))
, m_enableCrashReportingCheckBox(new QCheckBox(Tr::tr("Enable crash reporting")))
, m_warnBeforeOpeningBigFiles(
new QCheckBox(tr("Warn before opening text files greater than")))
new QCheckBox(Tr::tr("Warn before opening text files greater than")))
, m_bigFilesLimitSpinBox(new QSpinBox)
, m_terminalComboBox(new QComboBox)
, m_terminalOpenArgs(new QLineEdit)
, m_terminalExecuteArgs(new QLineEdit)
, m_patchChooser(new Utils::PathChooser)
, m_environmentChangesLabel(new Utils::ElidingLabel)
, m_askBeforeExitCheckBox(new QCheckBox(tr("Ask for confirmation before exiting")))
, m_askBeforeExitCheckBox(new QCheckBox(Tr::tr("Ask for confirmation before exiting")))
, m_reloadBehavior(new QComboBox)
, m_autoSaveCheckBox(new QCheckBox(tr("Auto-save modified files")))
, m_clearCrashReportsButton(new QPushButton(tr("Clear Local Crash Reports")))
, m_autoSaveCheckBox(new QCheckBox(Tr::tr("Auto-save modified files")))
, m_clearCrashReportsButton(new QPushButton(Tr::tr("Clear Local Crash Reports")))
, m_crashReportsSizeText(new QLabel)
, m_autoSaveInterval(new QSpinBox)
, m_autoSaveRefactoringCheckBox(new QCheckBox(tr("Auto-save files after refactoring")))
, m_autoSaveRefactoringCheckBox(new QCheckBox(Tr::tr("Auto-save files after refactoring")))
{
m_autoSuspendCheckBox->setToolTip(
tr("Automatically free resources of old documents that are not visible and not "
Tr::tr("Automatically free resources of old documents that are not visible and not "
"modified. They stay visible in the list of open documents."));
m_autoSuspendMinDocumentCount->setMinimum(1);
m_autoSuspendMinDocumentCount->setMaximum(500);
m_autoSuspendMinDocumentCount->setValue(30);
m_enableCrashReportingCheckBox->setToolTip(
tr("Allow crashes to be automatically reported. Collected reports are "
Tr::tr("Allow crashes to be automatically reported. Collected reports are "
"used for the sole purpose of fixing bugs."));
m_bigFilesLimitSpinBox->setSuffix(tr("MB"));
m_bigFilesLimitSpinBox->setSuffix(Tr::tr("MB"));
m_bigFilesLimitSpinBox->setMinimum(1);
m_bigFilesLimitSpinBox->setMaximum(500);
m_bigFilesLimitSpinBox->setValue(5);
m_terminalExecuteArgs->setToolTip(
tr("Command line arguments used for \"Run in terminal\"."));
Tr::tr("Command line arguments used for \"Run in terminal\"."));
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(5);
m_environmentChangesLabel->setSizePolicy(sizePolicy);
m_reloadBehavior->addItem(tr("Always Ask"));
m_reloadBehavior->addItem(tr("Reload All Unchanged Editors"));
m_reloadBehavior->addItem(tr("Ignore Modifications"));
m_autoSaveInterval->setSuffix(tr("min"));
m_reloadBehavior->addItem(Tr::tr("Always Ask"));
m_reloadBehavior->addItem(Tr::tr("Reload All Unchanged Editors"));
m_reloadBehavior->addItem(Tr::tr("Ignore Modifications"));
m_autoSaveInterval->setSuffix(Tr::tr("min"));
QSizePolicy termSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
termSizePolicy.setHorizontalStretch(3);
m_terminalComboBox->setSizePolicy(termSizePolicy);
m_terminalComboBox->setMinimumSize(QSize(100, 0));
m_terminalComboBox->setEditable(true);
m_terminalOpenArgs->setToolTip(
tr("Command line arguments used for \"%1\".").arg(FileUtils::msgTerminalHereAction()));
Tr::tr("Command line arguments used for \"%1\".").arg(FileUtils::msgTerminalHereAction()));
m_autoSaveInterval->setMinimum(1);
auto fileSystemCaseSensitivityLabel = new QLabel(tr("File system case sensitivity:"));
auto fileSystemCaseSensitivityLabel = new QLabel(Tr::tr("File system case sensitivity:"));
fileSystemCaseSensitivityLabel->setToolTip(
tr("Influences how file names are matched to decide if they are the same."));
auto autoSuspendLabel = new QLabel(tr("Files to keep open:"));
Tr::tr("Influences how file names are matched to decide if they are the same."));
auto autoSuspendLabel = new QLabel(Tr::tr("Files to keep open:"));
autoSuspendLabel->setToolTip(
tr("Minimum number of open documents that should be kept in memory. Increasing this "
Tr::tr("Minimum number of open documents that should be kept in memory. Increasing this "
"number will lead to greater resource usage when not manually closing documents."));
auto resetFileBrowserButton = new QPushButton(tr("Reset"));
resetFileBrowserButton->setToolTip(tr("Reset to default."));
auto resetFileBrowserButton = new QPushButton(Tr::tr("Reset"));
resetFileBrowserButton->setToolTip(Tr::tr("Reset to default."));
auto helpExternalFileBrowserButton = new QToolButton;
helpExternalFileBrowserButton->setText(tr("?"));
helpExternalFileBrowserButton->setText(Tr::tr("?"));
auto helpCrashReportingButton = new QToolButton;
helpCrashReportingButton->setText(tr("?"));
auto resetTerminalButton = new QPushButton(tr("Reset"));
resetTerminalButton->setToolTip(tr("Reset to default.", "Terminal"));
auto patchCommandLabel = new QLabel(tr("Patch command:"));
auto environmentButton = new QPushButton(tr("Change..."));
helpCrashReportingButton->setText(Tr::tr("?"));
auto resetTerminalButton = new QPushButton(Tr::tr("Reset"));
resetTerminalButton->setToolTip(Tr::tr("Reset to default.", "Terminal"));
auto patchCommandLabel = new QLabel(Tr::tr("Patch command:"));
auto environmentButton = new QPushButton(Tr::tr("Change..."));
environmentButton->setSizePolicy(QSizePolicy::Fixed,
environmentButton->sizePolicy().verticalPolicy());
Grid form;
form.addRow(
{tr("Environment:"), Span(2, Row{m_environmentChangesLabel, environmentButton})});
{Tr::tr("Environment:"), Span(2, Row{m_environmentChangesLabel, environmentButton})});
if (HostOsInfo::isAnyUnixHost()) {
form.addRow({tr("Terminal:"),
form.addRow({Tr::tr("Terminal:"),
Span(2,
Row{m_terminalComboBox,
m_terminalOpenArgs,
@@ -155,7 +155,7 @@ public:
resetTerminalButton})});
}
if (HostOsInfo::isAnyUnixHost() && !HostOsInfo::isMacHost()) {
form.addRow({tr("External file browser:"),
form.addRow({Tr::tr("External file browser:"),
Span(2,
Row{m_externalFileBrowserEdit,
resetFileBrowserButton,
@@ -167,15 +167,15 @@ public:
Span(2, Row{m_fileSystemCaseSensitivityChooser, st})});
}
form.addRow(
{tr("When files are externally modified:"), Span(2, Row{m_reloadBehavior, st})});
{Tr::tr("When files are externally modified:"), Span(2, Row{m_reloadBehavior, st})});
form.addRow(
{m_autoSaveCheckBox, Span(2, Row{tr("Interval:"), m_autoSaveInterval, st})});
{m_autoSaveCheckBox, Span(2, Row{Tr::tr("Interval:"), m_autoSaveInterval, st})});
form.addRow(Span(3, m_autoSaveRefactoringCheckBox));
form.addRow({m_autoSuspendCheckBox,
Span(2, Row{autoSuspendLabel, m_autoSuspendMinDocumentCount, st})});
form.addRow(Span(3, Row{m_warnBeforeOpeningBigFiles, m_bigFilesLimitSpinBox, st}));
form.addRow(Span(3,
Row{tr("Maximum number of entries in \"Recent Files\":"),
Row{Tr::tr("Maximum number of entries in \"Recent Files\":"),
m_maxRecentFilesSpinBox,
st}));
form.addRow(m_askBeforeExitCheckBox);
@@ -187,7 +187,7 @@ public:
Column {
Group {
title(tr("System")),
title(Tr::tr("System")),
Column { form, st }
}
}.attachTo(this);
@@ -208,21 +208,21 @@ public:
m_externalFileBrowserEdit->setText(UnixUtils::fileBrowser(ICore::settings()));
}
const QString patchToolTip = tr("Command used for reverting diff chunks.");
const QString patchToolTip = Tr::tr("Command used for reverting diff chunks.");
patchCommandLabel->setToolTip(patchToolTip);
m_patchChooser->setToolTip(patchToolTip);
m_patchChooser->setExpectedKind(PathChooser::ExistingCommand);
m_patchChooser->setHistoryCompleter(QLatin1String("General.PatchCommand.History"));
m_patchChooser->setFilePath(PatchTool::patchCommand());
m_autoSaveCheckBox->setChecked(EditorManagerPrivate::autoSaveEnabled());
m_autoSaveCheckBox->setToolTip(tr("Automatically creates temporary copies of "
m_autoSaveCheckBox->setToolTip(Tr::tr("Automatically creates temporary copies of "
"modified files. If %1 is restarted after "
"a crash or power failure, it asks whether to "
"recover the auto-saved content.")
.arg(Constants::IDE_DISPLAY_NAME));
m_autoSaveRefactoringCheckBox->setChecked(EditorManager::autoSaveAfterRefactoring());
m_autoSaveRefactoringCheckBox->setToolTip(
tr("Automatically saves all open files "
Tr::tr("Automatically saves all open files "
"affected by a refactoring operation,\nprovided they were unmodified before the "
"refactoring."));
m_autoSaveInterval->setValue(EditorManagerPrivate::autoSaveInterval());
@@ -247,10 +247,10 @@ public:
m_enableCrashReportingCheckBox->setChecked(
ICore::settings()->value(crashReportingEnabledKey).toBool());
connect(helpCrashReportingButton, &QAbstractButton::clicked, this, [this] {
showHelpDialog(tr("Crash Reporting"), CorePlugin::msgCrashpadInformation());
showHelpDialog(Tr::tr("Crash Reporting"), CorePlugin::msgCrashpadInformation());
});
connect(m_enableCrashReportingCheckBox, &QCheckBox::stateChanged, this, [this] {
const QString restartText = tr("The change will take effect after restart.");
const QString restartText = Tr::tr("The change will take effect after restart.");
Core::RestartDialog restartDialog(Core::ICore::dialogParent(), restartText);
restartDialog.exec();
if (restartDialog.result() == QDialog::Accepted)
@@ -291,16 +291,16 @@ public:
Qt::CaseSensitivity defaultSensitivity
= OsSpecificAspects::fileNameCaseSensitivity(HostOsInfo::hostOs());
if (defaultSensitivity == Qt::CaseSensitive) {
m_fileSystemCaseSensitivityChooser->addItem(tr("Case Sensitive (Default)"),
m_fileSystemCaseSensitivityChooser->addItem(Tr::tr("Case Sensitive (Default)"),
Qt::CaseSensitive);
} else {
m_fileSystemCaseSensitivityChooser->addItem(tr("Case Sensitive"), Qt::CaseSensitive);
m_fileSystemCaseSensitivityChooser->addItem(Tr::tr("Case Sensitive"), Qt::CaseSensitive);
}
if (defaultSensitivity == Qt::CaseInsensitive) {
m_fileSystemCaseSensitivityChooser->addItem(tr("Case Insensitive (Default)"),
m_fileSystemCaseSensitivityChooser->addItem(Tr::tr("Case Insensitive (Default)"),
Qt::CaseInsensitive);
} else {
m_fileSystemCaseSensitivityChooser->addItem(tr("Case Insensitive"),
m_fileSystemCaseSensitivityChooser->addItem(Tr::tr("Case Insensitive"),
Qt::CaseInsensitive);
}
const Qt::CaseSensitivity sensitivity = EditorManagerPrivate::readFileSystemSensitivity(
@@ -407,7 +407,7 @@ void SystemSettingsWidget::apply()
EditorManagerPrivate::writeFileSystemSensitivity(settings, selectedSensitivity);
RestartDialog dialog(
ICore::dialogParent(),
tr("The file system case sensitivity change will take effect after restart."));
Tr::tr("The file system case sensitivity change will take effect after restart."));
dialog.exec();
}
}
@@ -445,7 +445,7 @@ void SystemSettingsWidget::updateEnvironmentChangesLabel()
{
const QString shortSummary = Utils::EnvironmentItem::toStringList(m_environmentChanges)
.join("; ");
m_environmentChangesLabel->setText(shortSummary.isEmpty() ? tr("No changes to apply.")
m_environmentChangesLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.")
: shortSummary);
}
@@ -485,13 +485,13 @@ void SystemSettingsWidget::updateClearCrashWidgets()
void SystemSettingsWidget::showHelpForFileBrowser()
{
if (HostOsInfo::isAnyUnixHost() && !HostOsInfo::isMacHost())
showHelpDialog(tr("Variables"), UnixUtils::fileBrowserHelpText());
showHelpDialog(Tr::tr("Variables"), UnixUtils::fileBrowserHelpText());
}
SystemSettings::SystemSettings()
{
setId(Constants::SETTINGS_ID_SYSTEM);
setDisplayName(SystemSettingsWidget::tr("System"));
setDisplayName(Tr::tr("System"));
setCategory(Constants::SETTINGS_CATEGORY_CORE);
setWidgetCreator([] { return new SystemSettingsWidget; });
}

View File

@@ -1,12 +1,12 @@
// Copyright (C) 2016 Thorben Kroeger <thorbenkroeger@gmail.com>.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "coreconstants.h"
#include "icore.h"
#include "manhattanstyle.h"
#include "themechooser.h"
#include "coreconstants.h"
#include "coreplugintr.h"
#include "dialogs/restartdialog.h"
#include "icore.h"
#include <utils/algorithm.h>
#include <utils/theme/theme.h>
@@ -46,7 +46,7 @@ QString ThemeEntry::displayName() const
if (m_displayName.isEmpty() && !m_filePath.isEmpty()) {
QSettings settings(m_filePath, QSettings::IniFormat);
m_displayName = settings.value(QLatin1String(themeNameKey),
QCoreApplication::tr("unnamed")).toString();
Tr::tr("unnamed")).toString();
}
return m_displayName;
}
@@ -118,8 +118,7 @@ ThemeChooserPrivate::ThemeChooserPrivate(QWidget *widget)
auto layout = new QHBoxLayout(widget);
layout->addWidget(m_themeComboBox);
auto overriddenLabel = new QLabel;
overriddenLabel->setText(ThemeChooser::tr("Current theme: %1")
.arg(creatorTheme()->displayName()));
overriddenLabel->setText(Tr::tr("Current theme: %1").arg(creatorTheme()->displayName()));
layout->addWidget(overriddenLabel);
layout->setContentsMargins(0, 0, 0, 0);
auto horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
@@ -167,7 +166,7 @@ void ThemeChooser::apply()
// save filename of selected theme in global config
settings->setValueWithDefault(Constants::SETTINGS_THEME, themeId, defaultThemeId());
RestartDialog restartDialog(ICore::dialogParent(),
tr("The theme change will take effect after restart."));
Tr::tr("The theme change will take effect after restart."));
restartDialog.exec();
}
}

View File

@@ -2,29 +2,28 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "vcsmanager.h"
#include "iversioncontrol.h"
#include "icore.h"
#include "documentmanager.h"
#include "idocument.h"
#include <coreplugin/dialogs/addtovcsdialog.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include "coreplugintr.h"
#include "dialogs/addtovcsdialog.h"
#include "documentmanager.h"
#include "editormanager/editormanager.h"
#include "icore.h"
#include "idocument.h"
#include "iversioncontrol.h"
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/infobar.h>
#include <utils/qtcassert.h>
#include <vcsbase/vcsbaseconstants.h>
#include <QDir>
#include <QString>
#include <QList>
#include <QMap>
#include <QFileInfo>
#include <QMessageBox>
#include <QString>
#include <optional>
@@ -263,7 +262,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const FilePath &inpu
Utils::InfoBar *infoBar = curDocument ? curDocument->infoBar() : nullptr;
if (infoBar && infoBar->canInfoBeAdded(vcsWarning)) {
Utils::InfoBarEntry info(vcsWarning,
tr("%1 repository was detected but %1 is not configured.")
Tr::tr("%1 repository was detected but %1 is not configured.")
.arg(versionControl->displayName()),
Utils::InfoBarEntry::GlobalSuppression::Enabled);
d->m_unconfiguredVcs = versionControl;
@@ -335,8 +334,8 @@ FilePaths VcsManager::promptToDelete(IVersionControl *vc, const FilePaths &fileP
const QString fileListForUi = "<ul><li>" + transform(filePaths, [](const FilePath &fp) {
return fp.toUserOutput();
}).join("</li><li>") + "</li></ul>";
const QString title = tr("Version Control");
const QString msg = tr("Remove the following files from the version control system (%2)? "
const QString title = Tr::tr("Version Control");
const QString msg = Tr::tr("Remove the following files from the version control system (%2)? "
"%1Note: This might remove the local file.").arg(fileListForUi, vc->displayName());
const QMessageBox::StandardButton button =
QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
@@ -353,29 +352,29 @@ FilePaths VcsManager::promptToDelete(IVersionControl *vc, const FilePaths &fileP
QString VcsManager::msgAddToVcsTitle()
{
return tr("Add to Version Control");
return Tr::tr("Add to Version Control");
}
QString VcsManager::msgPromptToAddToVcs(const QStringList &files, const IVersionControl *vc)
{
return files.size() == 1
? tr("Add the file\n%1\nto version control (%2)?")
? Tr::tr("Add the file\n%1\nto version control (%2)?")
.arg(files.front(), vc->displayName())
: tr("Add the files\n%1\nto version control (%2)?")
: Tr::tr("Add the files\n%1\nto version control (%2)?")
.arg(files.join(QString(QLatin1Char('\n'))), vc->displayName());
}
QString VcsManager::msgAddToVcsFailedTitle()
{
return tr("Adding to Version Control Failed");
return Tr::tr("Adding to Version Control Failed");
}
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
{
return files.size() == 1
? tr("Could not add the file\n%1\nto version control (%2)\n")
? Tr::tr("Could not add the file\n%1\nto version control (%2)\n")
.arg(files.front(), vc->displayName())
: tr("Could not add the following files to version control (%1)\n%2")
: Tr::tr("Could not add the following files to version control (%1)\n%2")
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
}

Some files were not shown because too many files have changed in this diff Show More