ProjectExplorer: Tr::tr

Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-13 12:38:22 +01:00
parent e373fe6aa9
commit c5f7f5ab0a
149 changed files with 1672 additions and 15967 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

@@ -4068,7 +4068,7 @@ Es recomendado usar gdb 6.7 o posterior.</translation>
</message> </message>
</context> </context>
<context> <context>
<name>DependenciesModel</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Unable to add dependency</source> <source>Unable to add dependency</source>
<translation>No fue posible agregar la dependencia</translation> <translation>No fue posible agregar la dependencia</translation>
@@ -4077,9 +4077,6 @@ Es recomendado usar gdb 6.7 o posterior.</translation>
<source>This would create a circular dependency.</source> <source>This would create a circular dependency.</source>
<translation>Esto creará una dependencia circular.</translation> <translation>Esto creará una dependencia circular.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesWidget</name>
<message> <message>
<source>%1 has no dependencies.</source> <source>%1 has no dependencies.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -6817,7 +6814,7 @@ Nombre base de librería: %1</translation>
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::AbstractProcessStep</name> <name>::ProjectExplorer</name>
<message> <message>
<source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt; <source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt;
</source> </source>
@@ -6836,9 +6833,6 @@ Nombre base de librería: %1</translation>
<source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source> <source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#ff0000&quot;&gt;No se pudo arrancar el proceso %1 &lt;/b&gt;&lt;/font&gt;</translation> <translation>&lt;font color=&quot;#ff0000&quot;&gt;No se pudo arrancar el proceso %1 &lt;/b&gt;&lt;/font&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::BuildManager</name>
<message> <message>
<source>&lt;font color=&quot;#ff0000&quot;&gt;Canceled build.&lt;/font&gt;</source> <source>&lt;font color=&quot;#ff0000&quot;&gt;Canceled build.&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#ff0000&quot;&gt;Construcción cancelada.&lt;/font&gt;</translation> <translation>&lt;font color=&quot;#ff0000&quot;&gt;Construcción cancelada.&lt;/font&gt;</translation>
@@ -6870,9 +6864,6 @@ Nombre base de librería: %1</translation>
<source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source> <source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source>
<translation>&lt;b&gt;Ejecutando los pasos para construir el proyecto %2...&lt;/b&gt;</translation> <translation>&lt;b&gt;Ejecutando los pasos para construir el proyecto %2...&lt;/b&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfiguration</name>
<message> <message>
<source>Custom Executable</source> <source>Custom Executable</source>
<translation>Ejecutable indicado</translation> <translation>Ejecutable indicado</translation>
@@ -6885,16 +6876,6 @@ Nombre base de librería: %1</translation>
<source>Run %1</source> <source>Run %1</source>
<translation>Ejecutar %1</translation> <translation>Ejecutar %1</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfigurationFactory</name>
<message>
<source>Custom Executable</source>
<translation>Ejecutable indicado</translation>
</message>
</context>
<context>
<name>ProjectExplorer::EnvironmentModel</name>
<message> <message>
<source>&lt;UNSET&gt;</source> <source>&lt;UNSET&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -6915,9 +6896,6 @@ Nombre base de librería: %1</translation>
<source>&lt;VALUE&gt;</source> <source>&lt;VALUE&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::EnvironmentWidget</name>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished">&amp;Editar</translation> <translation type="unfinished">&amp;Editar</translation>
@@ -6946,16 +6924,10 @@ Nombre base de librería: %1</translation>
<source>Summary: No changes to Environment</source> <source>Summary: No changes to Environment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFilter</name>
<message> <message>
<source>Files in any project</source> <source>Files in any project</source>
<translation>Archivos en cualquier proyecto</translation> <translation>Archivos en cualquier proyecto</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFind</name>
<message> <message>
<source>All Projects</source> <source>All Projects</source>
<translation>Todos los proyectos</translation> <translation>Todos los proyectos</translation>
@@ -6964,9 +6936,6 @@ Nombre base de librería: %1</translation>
<source>File &amp;pattern:</source> <source>File &amp;pattern:</source>
<translation>&amp;Patrón de archivos:</translation> <translation>&amp;Patrón de archivos:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationLauncher</name>
<message> <message>
<source>Failed to start program. Path or permissions wrong?</source> <source>Failed to start program. Path or permissions wrong?</source>
<translation type="obsolete">Fallo intentando iniciar el programa. ¿Ruta o permisos incorrectos?</translation> <translation type="obsolete">Fallo intentando iniciar el programa. ¿Ruta o permisos incorrectos?</translation>
@@ -6979,16 +6948,10 @@ Nombre base de librería: %1</translation>
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation type="obsolete">Ocurrió un error mientras se ejecutaba el programa.</translation> <translation type="obsolete">Ocurrió un error mientras se ejecutaba el programa.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationRunConfigurationRunner</name>
<message> <message>
<source>Run</source> <source>Run</source>
<translation type="obsolete">Ejecutar</translation> <translation type="obsolete">Ejecutar</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationRunControl</name>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation type="obsolete">Iniciando %1...</translation> <translation type="obsolete">Iniciando %1...</translation>
@@ -6997,23 +6960,14 @@ Nombre base de librería: %1</translation>
<source>%1 exited with code %2</source> <source>%1 exited with code %2</source>
<translation type="obsolete">%1 finalizó retornando %2</translation> <translation type="obsolete">%1 finalizó retornando %2</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsPanel</name>
<message> <message>
<source>Build Settings</source> <source>Build Settings</source>
<translation>Ajustes de construcción</translation> <translation>Ajustes de construcción</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsPropertiesPage</name>
<message> <message>
<source>Configurations</source> <source>Configurations</source>
<translation type="obsolete">Ajustes</translation> <translation type="obsolete">Ajustes</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsWidget</name>
<message> <message>
<source>Create &amp;New</source> <source>Create &amp;New</source>
<translation type="obsolete">Crear &amp;nuevo</translation> <translation type="obsolete">Crear &amp;nuevo</translation>
@@ -7066,9 +7020,6 @@ Nombre base de librería: %1</translation>
<source>Clone configuration</source> <source>Clone configuration</source>
<translation>Clonar configuración</translation> <translation>Clonar configuración</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildStepsPage</name>
<message> <message>
<source>No Build Steps</source> <source>No Build Steps</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -7089,24 +7040,10 @@ Nombre base de librería: %1</translation>
<source>Remove build step</source> <source>Remove build step</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Build Steps</source>
<translation>Etapas de construcción</translation>
</message>
<message>
<source>Clean Steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::CompileOutputWindow</name>
<message> <message>
<source>Compile Output</source> <source>Compile Output</source>
<translation>Salida del compilador</translation> <translation>Salida del compilador</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild</name>
<message> <message>
<source>Cancel Build &amp;&amp; Close</source> <source>Cancel Build &amp;&amp; Close</source>
<translation>Cancelar construcción y cerrar</translation> <translation>Cancelar construcción y cerrar</translation>
@@ -7131,16 +7068,10 @@ Nombre base de librería: %1</translation>
<source>Do you want to cancel the build process and close Qt Creator anyway?</source> <source>Do you want to cancel the build process and close Qt Creator anyway?</source>
<translation>¿Quiere cancelar la construcción y cerrar Qt Creator de todos modos?</translation> <translation>¿Quiere cancelar la construcción y cerrar Qt Creator de todos modos?</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFilter</name>
<message> <message>
<source>Files in current project</source> <source>Files in current project</source>
<translation>Archivos en el proyecto actual</translation> <translation>Archivos en el proyecto actual</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFind</name>
<message> <message>
<source>Current Project</source> <source>Current Project</source>
<translation>Proyecto actual</translation> <translation>Proyecto actual</translation>
@@ -7149,9 +7080,6 @@ Nombre base de librería: %1</translation>
<source>File &amp;pattern:</source> <source>File &amp;pattern:</source>
<translation>&amp;Patrón de archivo:</translation> <translation>&amp;Patrón de archivo:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CustomExecutableConfigurationWidget</name>
<message> <message>
<source>Name:</source> <source>Name:</source>
<translation>Nombre:</translation> <translation>Nombre:</translation>
@@ -7204,16 +7132,10 @@ Nombre base de librería: %1</translation>
<source>Base environment for this runconfiguration:</source> <source>Base environment for this runconfiguration:</source>
<translation type="unfinished">Entorno base para éste ajuste de ejecución:</translation> <translation type="unfinished">Entorno base para éste ajuste de ejecución:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesPanel</name>
<message> <message>
<source>Dependencies</source> <source>Dependencies</source>
<translation>Dependencias</translation> <translation>Dependencias</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DetailedModel</name>
<message> <message>
<source>%1 of project %2</source> <source>%1 of project %2</source>
<translation>%1, del proyecto %2</translation> <translation>%1, del proyecto %2</translation>
@@ -7226,16 +7148,10 @@ Nombre base de librería: %1</translation>
<source>Renaming file %1 to %2 failed.</source> <source>Renaming file %1 to %2 failed.</source>
<translation>El renombrado del archivo %1 a %2 ha fallado.</translation> <translation>El renombrado del archivo %1 a %2 ha fallado.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPanel</name>
<message> <message>
<source>Editor Settings</source> <source>Editor Settings</source>
<translation>Ajustes de edición</translation> <translation>Ajustes de edición</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPropertiesPage</name>
<message> <message>
<source>Default File Encoding:</source> <source>Default File Encoding:</source>
<translation>Codificación de caracteres predefinida:</translation> <translation>Codificación de caracteres predefinida:</translation>
@@ -7253,7 +7169,7 @@ Nombre base de librería: %1</translation>
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::Internal::NewSessionInputDialog</name> <name>::ProjectExplorer</name>
<message> <message>
<source>New session name</source> <source>New session name</source>
<translation>Nuevo nombre de sesión</translation> <translation>Nuevo nombre de sesión</translation>
@@ -7262,9 +7178,6 @@ Nombre base de librería: %1</translation>
<source>Enter the name of the new session:</source> <source>Enter the name of the new session:</source>
<translation>Introduzca el nombre para la nueva sesión:</translation> <translation>Introduzca el nombre para la nueva sesión:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionDialog</name>
<message> <message>
<source>Switch to session</source> <source>Switch to session</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -7297,9 +7210,6 @@ Nombre base de librería: %1</translation>
<source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source> <source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source>
<translation>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;¿Qué es una sesión?&lt;/a&gt;</translation> <translation>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;¿Qué es una sesión?&lt;/a&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputPane</name>
<message> <message>
<source>Re-run this run-configuration</source> <source>Re-run this run-configuration</source>
<translation>Volver a ejecutar con esta configuración</translation> <translation>Volver a ejecutar con esta configuración</translation>
@@ -7324,16 +7234,10 @@ Nombre base de librería: %1</translation>
<source>Unable to close</source> <source>Unable to close</source>
<translation>Imposible cerrar</translation> <translation>Imposible cerrar</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputWindow</name>
<message> <message>
<source>Application Output Window</source> <source>Application Output Window</source>
<translation>Ventana de salida de la aplicación</translation> <translation>Ventana de salida de la aplicación</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStep</name>
<message> <message>
<source>Custom Process Step</source> <source>Custom Process Step</source>
<translation>Etapa de construcción definida por el usuario</translation> <translation>Etapa de construcción definida por el usuario</translation>
@@ -7343,9 +7247,6 @@ Nombre base de librería: %1</translation>
<comment>item in combobox</comment> <comment>item in combobox</comment>
<translation type="unfinished">Etapa de construcción definida por el usuario</translation> <translation type="unfinished">Etapa de construcción definida por el usuario</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepConfigWidget</name>
<message> <message>
<source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source> <source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -7354,17 +7255,10 @@ Nombre base de librería: %1</translation>
<source>(disabled)</source> <source>(disabled)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepWidget</name>
<message> <message>
<source>Enable custom process step</source> <source>Enable custom process step</source>
<translation type="obsolete">Permitir etapa de construcción personalizada</translation> <translation type="obsolete">Permitir etapa de construcción personalizada</translation>
</message> </message>
<message>
<source>Name:</source>
<translation>Nombre:</translation>
</message>
<message> <message>
<location/> <location/>
<source>Command:</source> <source>Command:</source>
@@ -7385,9 +7279,6 @@ Nombre base de librería: %1</translation>
<source>Enable Custom Process Step</source> <source>Enable Custom Process Step</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPage</name>
<message> <message>
<source>Build and Run</source> <source>Build and Run</source>
<translation>Construir y ejecutar</translation> <translation>Construir y ejecutar</translation>
@@ -7400,16 +7291,10 @@ Nombre base de librería: %1</translation>
<source>Projectexplorer</source> <source>Projectexplorer</source>
<translation type="obsolete">Explorador de proyecto</translation> <translation type="obsolete">Explorador de proyecto</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileFactory</name>
<message> <message>
<source>Could not open the following project: &apos;%1&apos;</source> <source>Could not open the following project: &apos;%1&apos;</source>
<translation>No se pudo abrir el siguiente proyecto: &apos;%1&apos;</translation> <translation>No se pudo abrir el siguiente proyecto: &apos;%1&apos;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileWizardExtension</name>
<message> <message>
<source>Failed to add one or more files to project <source>Failed to add one or more files to project
&apos;%1&apos; (%2).</source> &apos;%1&apos; (%2).</source>
@@ -7420,9 +7305,6 @@ Nombre base de librería: %1</translation>
<source>Failed to add &apos;%1&apos; to the version control system.</source> <source>Failed to add &apos;%1&apos; to the version control system.</source>
<translation>Fallo al agregar &apos;%1&apos; al sistema de control de versiones.</translation> <translation>Fallo al agregar &apos;%1&apos; al sistema de control de versiones.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidget</name>
<message> <message>
<source>Simplify tree</source> <source>Simplify tree</source>
<translation>Simplificar árbol</translation> <translation>Simplificar árbol</translation>
@@ -7435,9 +7317,6 @@ Nombre base de librería: %1</translation>
<source>Synchronize with Editor</source> <source>Synchronize with Editor</source>
<translation>Sincronizar con el editor</translation> <translation>Sincronizar con el editor</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidgetFactory</name>
<message> <message>
<source>Projects</source> <source>Projects</source>
<translation>Proyectos</translation> <translation>Proyectos</translation>
@@ -7446,9 +7325,6 @@ Nombre base de librería: %1</translation>
<source>Filter tree</source> <source>Filter tree</source>
<translation>Filtrar árbol</translation> <translation>Filtrar árbol</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWindow</name>
<message> <message>
<source>Project Explorer</source> <source>Project Explorer</source>
<translation type="obsolete">Explorardor de proyecto</translation> <translation type="obsolete">Explorardor de proyecto</translation>
@@ -7473,9 +7349,6 @@ Nombre base de librería: %1</translation>
<source>No project loaded.</source> <source>No project loaded.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWizardPage</name>
<message> <message>
<source>Add to &amp;VCS (%1)</source> <source>Add to &amp;VCS (%1)</source>
<translation>Agregar al &amp;VCS (%1)</translation> <translation>Agregar al &amp;VCS (%1)</translation>
@@ -7484,9 +7357,6 @@ Nombre base de librería: %1</translation>
<source>Files to be added:</source> <source>Files to be added:</source>
<translation>Archivos a ser agregados:</translation> <translation>Archivos a ser agregados:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjetExplorerSettingsPageUi</name>
<message> <message>
<source>Save all files before Build</source> <source>Save all files before Build</source>
<translation type="obsolete">Guardar todos los archivos antes de construir</translation> <translation type="obsolete">Guardar todos los archivos antes de construir</translation>
@@ -7499,9 +7369,6 @@ Nombre base de librería: %1</translation>
<source>Build and Run</source> <source>Build and Run</source>
<translation type="obsolete">Construir y ejecutar</translation> <translation type="obsolete">Construir y ejecutar</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RemoveFileDialog</name>
<message> <message>
<source>Remove File</source> <source>Remove File</source>
<translation>Suprimir archivo</translation> <translation>Suprimir archivo</translation>
@@ -7521,27 +7388,10 @@ Nombre base de librería: %1</translation>
<source>File to remove:</source> <source>File to remove:</source>
<translation>Archivo a suprimir:</translation> <translation>Archivo a suprimir:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPanel</name>
<message> <message>
<source>Run Settings</source> <source>Run Settings</source>
<translation>Ajustes de ejecución</translation> <translation>Ajustes de ejecución</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsWidget</name>
<message>
<source>Add</source>
<translation type="unfinished">Agregar</translation>
</message>
<message>
<source>Remove</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPropertiesPage</name>
<message> <message>
<source>Run &amp;configuration:</source> <source>Run &amp;configuration:</source>
<translation type="obsolete">Ajuste de eje&amp;cución:</translation> <translation type="obsolete">Ajuste de eje&amp;cución:</translation>
@@ -7564,9 +7414,6 @@ Nombre base de librería: %1</translation>
<source>Edit run configuration:</source> <source>Edit run configuration:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionFile</name>
<message> <message>
<source>Session</source> <source>Session</source>
<translation>Sesión</translation> <translation>Sesión</translation>
@@ -7576,16 +7423,10 @@ Nombre base de librería: %1</translation>
<comment>default file name to display</comment> <comment>default file name to display</comment>
<translation>Sin título</translation> <translation>Sin título</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskDelegate</name>
<message> <message>
<source>File not found: %1</source> <source>File not found: %1</source>
<translation>Archivo no encontrado: %1</translation> <translation>Archivo no encontrado: %1</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskWindow</name>
<message> <message>
<source>Build Issues</source> <source>Build Issues</source>
<translation>Construcción</translation> <translation>Construcción</translation>
@@ -7598,9 +7439,6 @@ Nombre base de librería: %1</translation>
<source>Show Warnings</source> <source>Show Warnings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WinGuiProcess</name>
<message> <message>
<source>The process could not be started!</source> <source>The process could not be started!</source>
<translation>El proceso no pudo ser iniciado!</translation> <translation>El proceso no pudo ser iniciado!</translation>
@@ -7609,9 +7447,6 @@ Nombre base de librería: %1</translation>
<source>Cannot retrieve debugging output!</source> <source>Cannot retrieve debugging output!</source>
<translation>No se pudo obtener salida de depurado!</translation> <translation>No se pudo obtener salida de depurado!</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WizardPage</name>
<message> <message>
<source>Project management</source> <source>Project management</source>
<translation>Gestor de proyectos</translation> <translation>Gestor de proyectos</translation>
@@ -7644,13 +7479,6 @@ Nombre base de librería: %1</translation>
</translation> </translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::ProjectExplorerPlugin</name>
<message>
<source>Projects</source>
<translation>Proyectos</translation>
</message>
<message> <message>
<source>&amp;Build</source> <source>&amp;Build</source>
<translation>&amp;Construir</translation> <translation>&amp;Construir</translation>
@@ -7715,10 +7543,6 @@ Nombre base de librería: %1</translation>
<source>Close All Projects</source> <source>Close All Projects</source>
<translation>Cerrar todos los proyectos</translation> <translation>Cerrar todos los proyectos</translation>
</message> </message>
<message>
<source>Session</source>
<translation>Sesión</translation>
</message>
<message> <message>
<source>Set Build Configuration</source> <source>Set Build Configuration</source>
<translation>Establecer ajustes de construcción</translation> <translation>Establecer ajustes de construcción</translation>
@@ -7933,9 +7757,6 @@ al control de versiones (%2)?</translation>
<source>Could not delete file %1.</source> <source>Could not delete file %1.</source>
<translation>No se pudo eliminar el archivo %1.</translation> <translation>No se pudo eliminar el archivo %1.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::SessionManager</name>
<message> <message>
<source>Error while restoring session</source> <source>Error while restoring session</source>
<translation>Error restaurando sesión</translation> <translation>Error restaurando sesión</translation>
@@ -11485,7 +11306,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPageUi</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Build and Run</source> <source>Build and Run</source>
<translation type="unfinished">Construir y ejecutar</translation> <translation type="unfinished">Construir y ejecutar</translation>
@@ -11515,9 +11336,6 @@ p, li { white-space: pre-wrap; }
<source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source> <source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePageWidget</name>
<message> <message>
<source>Form</source> <source>Form</source>
<translation type="unfinished">Formulario</translation> <translation type="unfinished">Formulario</translation>
@@ -12712,7 +12530,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::ApplicationLauncher</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Failed to start program. Path or permissions wrong?</source> <source>Failed to start program. Path or permissions wrong?</source>
<translation type="unfinished">Fallo intentando iniciar el programa. ¿Ruta o permisos incorrectos?</translation> <translation type="unfinished">Fallo intentando iniciar el programa. ¿Ruta o permisos incorrectos?</translation>
@@ -12725,16 +12543,10 @@ p, li { white-space: pre-wrap; }
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation type="unfinished">Ocurrió un error mientras se ejecutaba el programa.</translation> <translation type="unfinished">Ocurrió un error mientras se ejecutaba el programa.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::LocalApplicationRunControlFactory</name>
<message> <message>
<source>Run</source> <source>Run</source>
<translation type="unfinished">Ejecutar</translation> <translation type="unfinished">Ejecutar</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::LocalApplicationRunControl</name>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation type="unfinished">Iniciando %1...</translation> <translation type="unfinished">Iniciando %1...</translation>
@@ -12743,9 +12555,6 @@ p, li { white-space: pre-wrap; }
<source>%1 exited with code %2</source> <source>%1 exited with code %2</source>
<translation type="unfinished">%1 finalizó retornando %2</translation> <translation type="unfinished">%1 finalizó retornando %2</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::DebuggingHelperLibrary</name>
<message> <message>
<source>The target directory %1 could not be created.</source> <source>The target directory %1 could not be created.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -12785,23 +12594,14 @@ Reason: %2</source>
</source> </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePage</name>
<message> <message>
<source>Develop</source> <source>Develop</source>
<translation type="unfinished">Desarrollar</translation> <translation type="unfinished">Desarrollar</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ActiveConfigurationWidget</name>
<message> <message>
<source>Active run configuration</source> <source>Active run configuration</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectLabel</name>
<message> <message>
<source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source> <source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -12810,9 +12610,6 @@ Reason: %2</source>
<source>No Project loaded</source> <source>No Project loaded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectPushButton</name>
<message> <message>
<source>Select Project</source> <source>Select Project</source>
<translation type="unfinished"></translation> <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

@@ -5302,7 +5302,7 @@ Gdb 6.7 vagy későbbi használata erősen ajánlott.</translation>
</message> </message>
</context> </context>
<context> <context>
<name>DependenciesModel</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Unable to add dependency</source> <source>Unable to add dependency</source>
<translation>Nem lehet függőséget hozzáadni</translation> <translation>Nem lehet függőséget hozzáadni</translation>
@@ -10419,7 +10419,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::0</name> <name>::ProjectExplorer</name>
<message> <message>
<source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt; <source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt;
</source> </source>
@@ -10820,9 +10820,6 @@ a verziókövetőhöz (%2)?</translation>
<source>Session (&apos;%1&apos;)</source> <source>Session (&apos;%1&apos;)</source>
<translation type="obsolete">(&apos;%1&apos;) szakasz</translation> <translation type="obsolete">(&apos;%1&apos;) szakasz</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::AbstractProcessStep</name>
<message> <message>
<source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt; <source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt;
</source> </source>
@@ -10841,9 +10838,6 @@ a verziókövetőhöz (%2)?</translation>
<source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source> <source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#ff0000&quot;&gt;Nem sikerült elindítani a(z) %1 folyamatot &lt;/b&gt;&lt;/font&gt;</translation> <translation>&lt;font color=&quot;#ff0000&quot;&gt;Nem sikerült elindítani a(z) %1 folyamatot &lt;/b&gt;&lt;/font&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::ApplicationLauncher</name>
<message> <message>
<source>Failed to start program. Path or permissions wrong?</source> <source>Failed to start program. Path or permissions wrong?</source>
<translation>Nem sikerült elindítani a programot. Rossz útvonal vagy jogosultságok?</translation> <translation>Nem sikerült elindítani a programot. Rossz útvonal vagy jogosultságok?</translation>
@@ -10856,9 +10850,6 @@ a verziókövetőhöz (%2)?</translation>
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation>Néhány hiba történt a program futtatása közben.</translation> <translation>Néhány hiba történt a program futtatása közben.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::BuildManager</name>
<message> <message>
<source>Finished %n of %1 build steps</source> <source>Finished %n of %1 build steps</source>
<translation>%1 %n építési lépése befejezve <translation>%1 %n építési lépése befejezve
@@ -10888,9 +10879,6 @@ a verziókövetőhöz (%2)?</translation>
<source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source> <source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source>
<translation>&lt;b&gt;Építések lépések futtatása a(z) %2 projektre...&lt;/b&gt;</translation> <translation>&lt;b&gt;Építések lépések futtatása a(z) %2 projektre...&lt;/b&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfiguration</name>
<message> <message>
<source>Custom Executable</source> <source>Custom Executable</source>
<translation>Szokásos futtatható</translation> <translation>Szokásos futtatható</translation>
@@ -10903,16 +10891,6 @@ a verziókövetőhöz (%2)?</translation>
<source>Run %1</source> <source>Run %1</source>
<translation>%1 futtatása</translation> <translation>%1 futtatása</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfigurationFactory</name>
<message>
<source>Custom Executable</source>
<translation>Szokásos futtatható</translation>
</message>
</context>
<context>
<name>ProjectExplorer::DebuggingHelperLibrary</name>
<message> <message>
<source>The target directory %1 could not be created.</source> <source>The target directory %1 could not be created.</source>
<translation>Nem lehet létrehozni a(z) %1 cél könytárat.</translation> <translation>Nem lehet létrehozni a(z) %1 cél könytárat.</translation>
@@ -10955,9 +10933,6 @@ Ok: %2</translation>
</source> </source>
<translation>%1 futtatása ....</translation> <translation>%1 futtatása ....</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::EnvironmentModel</name>
<message> <message>
<source>&lt;UNSET&gt;</source> <source>&lt;UNSET&gt;</source>
<translation>&lt;Nincs beállítva&gt;</translation> <translation>&lt;Nincs beállítva&gt;</translation>
@@ -10978,9 +10953,6 @@ Ok: %2</translation>
<source>&lt;VALUE&gt;</source> <source>&lt;VALUE&gt;</source>
<translation>&lt;ÉRTÉK&gt;</translation> <translation>&lt;ÉRTÉK&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::EnvironmentWidget</name>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>&amp;Szerkesztés</translation> <translation>&amp;Szerkesztés</translation>
@@ -11009,9 +10981,6 @@ Ok: %2</translation>
<source>Summary: No changes to Environment</source> <source>Summary: No changes to Environment</source>
<translation>Összegzés: Nem történt változás a környezetben</translation> <translation>Összegzés: Nem történt változás a környezetben</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::0</name>
<message> <message>
<source>Files in any project</source> <source>Files in any project</source>
<translation type="obsolete">Bármely projektben levő fájlok</translation> <translation type="obsolete">Bármely projektben levő fájlok</translation>
@@ -11036,10 +11005,6 @@ Ok: %2</translation>
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation type="obsolete">Néhány hiba történt a program futtatása közben.</translation> <translation type="obsolete">Néhány hiba történt a program futtatása közben.</translation>
</message> </message>
<message>
<source>Run</source>
<translation type="obsolete">Futtatás</translation>
</message>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation type="obsolete">%1 elindítása...</translation> <translation type="obsolete">%1 elindítása...</translation>
@@ -11298,10 +11263,6 @@ Ok: %2</translation>
<source>Hide generated files</source> <source>Hide generated files</source>
<translation type="obsolete">Generált fájlok elrejtése</translation> <translation type="obsolete">Generált fájlok elrejtése</translation>
</message> </message>
<message>
<source>Projects</source>
<translation type="obsolete">Projektek</translation>
</message>
<message> <message>
<source>Filter tree</source> <source>Filter tree</source>
<translation type="obsolete">Szűrő fa</translation> <translation type="obsolete">Szűrő fa</translation>
@@ -11386,10 +11347,6 @@ Ok: %2</translation>
<source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source> <source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source>
<translation type="obsolete">&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;Mi az a szakasz?&lt;/a&gt;</translation> <translation type="obsolete">&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;Mi az a szakasz?&lt;/a&gt;</translation>
</message> </message>
<message>
<source>Session</source>
<translation type="obsolete">Szakasz</translation>
</message>
<message> <message>
<source>Untitled</source> <source>Untitled</source>
<comment>default file name to display</comment> <comment>default file name to display</comment>
@@ -11437,23 +11394,14 @@ Ok: %2</translation>
<translation type="obsolete">A következő fájlok lesznek hozzáadva: <translation type="obsolete">A következő fájlok lesznek hozzáadva:
</translation> </translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ActiveConfigurationWidget</name>
<message> <message>
<source>Active run configuration</source> <source>Active run configuration</source>
<translation>Aktív futtatás konfiguráció</translation> <translation>Aktív futtatás konfiguráció</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFilter</name>
<message> <message>
<source>Files in any project</source> <source>Files in any project</source>
<translation>Bármely projektben levő fájlok</translation> <translation>Bármely projektben levő fájlok</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFind</name>
<message> <message>
<source>All Projects</source> <source>All Projects</source>
<translation>Az összes projekt</translation> <translation>Az összes projekt</translation>
@@ -11462,9 +11410,6 @@ Ok: %2</translation>
<source>File &amp;pattern:</source> <source>File &amp;pattern:</source>
<translation>Fájl &amp;minta:</translation> <translation>Fájl &amp;minta:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildConfigDialog</name>
<message> <message>
<source>Change build configuration &amp;&amp; continue</source> <source>Change build configuration &amp;&amp; continue</source>
<translation>Építési konfigurcáiók megváltoztatása &amp;&amp; folytatása</translation> <translation>Építési konfigurcáiók megváltoztatása &amp;&amp; folytatása</translation>
@@ -11497,16 +11442,10 @@ Ok: %2</translation>
<source>Choose build configuration:</source> <source>Choose build configuration:</source>
<translation>Válasszon építési konfigurációt:</translation> <translation>Válasszon építési konfigurációt:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsPanel</name>
<message> <message>
<source>Build Settings</source> <source>Build Settings</source>
<translation>Építési beállítások</translation> <translation>Építési beállítások</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsWidget</name>
<message> <message>
<source>Edit Build Configuration:</source> <source>Edit Build Configuration:</source>
<translation>Építési konfiguráció szerkesztése:</translation> <translation>Építési konfiguráció szerkesztése:</translation>
@@ -11543,9 +11482,6 @@ Ok: %2</translation>
<source>New Configuration Name:</source> <source>New Configuration Name:</source>
<translation>Új konfiguráció név:</translation> <translation>Új konfiguráció név:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildStepsPage</name>
<message> <message>
<source>No Build Steps</source> <source>No Build Steps</source>
<translation>Nincsenek építési lépések</translation> <translation>Nincsenek építési lépések</translation>
@@ -11570,20 +11506,10 @@ Ok: %2</translation>
<source>Clean Steps</source> <source>Clean Steps</source>
<translation>Lépések kiürítése</translation> <translation>Lépések kiürítése</translation>
</message> </message>
<message>
<source>Build Steps</source>
<translation>Építése lépések</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::CompileOutputWindow</name>
<message> <message>
<source>Compile Output</source> <source>Compile Output</source>
<translation>Fordítási kimenet</translation> <translation>Fordítási kimenet</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild</name>
<message> <message>
<source>Cancel Build &amp;&amp; Close</source> <source>Cancel Build &amp;&amp; Close</source>
<translation>Építés visszavonása &amp;&amp; bezárása</translation> <translation>Építés visszavonása &amp;&amp; bezárása</translation>
@@ -11604,27 +11530,14 @@ Ok: %2</translation>
<source>Do you want to cancel the build process and close Qt Creator anyway?</source> <source>Do you want to cancel the build process and close Qt Creator anyway?</source>
<translation>Vissza szeretné vonni az építési folyamatot és bezárni a Qt Creatort?</translation> <translation>Vissza szeretné vonni az építési folyamatot és bezárni a Qt Creatort?</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFilter</name>
<message> <message>
<source>Files in current project</source> <source>Files in current project</source>
<translation>Fájlok a jelenlegi projektben</translation> <translation>Fájlok a jelenlegi projektben</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFind</name>
<message> <message>
<source>Current Project</source> <source>Current Project</source>
<translation>Aktuális Projekt</translation> <translation>Aktuális Projekt</translation>
</message> </message>
<message>
<source>File &amp;pattern:</source>
<translation>Fájl &amp;minta:</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::CustomExecutableConfigurationWidget</name>
<message> <message>
<source>Name:</source> <source>Name:</source>
<translation>Név:</translation> <translation>Név:</translation>
@@ -11673,16 +11586,10 @@ Ok: %2</translation>
<source>Running executable: &lt;b&gt;%1&lt;/b&gt; %2</source> <source>Running executable: &lt;b&gt;%1&lt;/b&gt; %2</source>
<translation>Futtatható futtatása: &lt;b&gt;%1&lt;/b&gt; %2</translation> <translation>Futtatható futtatása: &lt;b&gt;%1&lt;/b&gt; %2</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesPanel</name>
<message> <message>
<source>Dependencies</source> <source>Dependencies</source>
<translation>Függpségek</translation> <translation>Függpségek</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesWidget</name>
<message> <message>
<source>%1 has no dependencies.</source> <source>%1 has no dependencies.</source>
<translation>%1-nek nincsen függősége.</translation> <translation>%1-nek nincsen függősége.</translation>
@@ -11695,9 +11602,6 @@ Ok: %2</translation>
<source>%1 depends on: %2.</source> <source>%1 depends on: %2.</source>
<translation>%1 a(z) %2-től függ.</translation> <translation>%1 a(z) %2-től függ.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DetailedModel</name>
<message> <message>
<source>%1 of project %2</source> <source>%1 of project %2</source>
<translation>A(z) %2 projekt %1-e</translation> <translation>A(z) %2 projekt %1-e</translation>
@@ -11710,16 +11614,10 @@ Ok: %2</translation>
<source>Renaming file %1 to %2 failed.</source> <source>Renaming file %1 to %2 failed.</source>
<translation>A(z) %1 fájl átnevezése %2-re nem sikerült.</translation> <translation>A(z) %1 fájl átnevezése %2-re nem sikerült.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPanel</name>
<message> <message>
<source>Editor Settings</source> <source>Editor Settings</source>
<translation>Szerkesztő beállítások</translation> <translation>Szerkesztő beállítások</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPropertiesPage</name>
<message> <message>
<source>Default File Encoding:</source> <source>Default File Encoding:</source>
<translation>Alapértelmezett fájl kódolás:</translation> <translation>Alapértelmezett fájl kódolás:</translation>
@@ -11737,7 +11635,7 @@ Ok: %2</translation>
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::Internal::LocalApplicationRunControl</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation>%1 elindítása...</translation> <translation>%1 elindítása...</translation>
@@ -11746,16 +11644,10 @@ Ok: %2</translation>
<source>%1 exited with code %2</source> <source>%1 exited with code %2</source>
<translation>%1 befejeződött %2-s kóddal</translation> <translation>%1 befejeződött %2-s kóddal</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::LocalApplicationRunControlFactory</name>
<message> <message>
<source>Run</source> <source>Run</source>
<translation>Futtatás</translation> <translation>Futtatás</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::NewSessionInputDialog</name>
<message> <message>
<source>New session name</source> <source>New session name</source>
<translation>Új szakasz név</translation> <translation>Új szakasz név</translation>
@@ -11764,9 +11656,6 @@ Ok: %2</translation>
<source>Enter the name of the new session:</source> <source>Enter the name of the new session:</source>
<translation>Gépelje be az új szakasz nevét:</translation> <translation>Gépelje be az új szakasz nevét:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputPane</name>
<message> <message>
<source>Re-run this run-configuration</source> <source>Re-run this run-configuration</source>
<translation>Futtatás-konfiguráció újrafuttatása</translation> <translation>Futtatás-konfiguráció újrafuttatása</translation>
@@ -11787,16 +11676,10 @@ Ok: %2</translation>
<source>Unable to close</source> <source>Unable to close</source>
<translation>Nem lehet bezárni</translation> <translation>Nem lehet bezárni</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputWindow</name>
<message> <message>
<source>Application Output Window</source> <source>Application Output Window</source>
<translation>Alkalmazás kimeneti ablak</translation> <translation>Alkalmazás kimeneti ablak</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStep</name>
<message> <message>
<source>Custom Process Step</source> <source>Custom Process Step</source>
<translation>Szokásos folyamat lépés</translation> <translation>Szokásos folyamat lépés</translation>
@@ -11806,9 +11689,6 @@ Ok: %2</translation>
<comment>item in combobox</comment> <comment>item in combobox</comment>
<translation>Szokásos folyamat lépés</translation> <translation>Szokásos folyamat lépés</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepConfigWidget</name>
<message> <message>
<source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source> <source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source>
<translation>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</translation> <translation>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</translation>
@@ -11817,32 +11697,18 @@ Ok: %2</translation>
<source>(disabled)</source> <source>(disabled)</source>
<translation>(tiltva)</translation> <translation>(tiltva)</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepWidget</name>
<message> <message>
<source>Enable Custom Process Step</source> <source>Enable Custom Process Step</source>
<translation>Szokásos folyamat lépések engedélyezése</translation> <translation>Szokásos folyamat lépések engedélyezése</translation>
</message> </message>
<message>
<source>Name:</source>
<translation>Név:</translation>
</message>
<message> <message>
<source>Command:</source> <source>Command:</source>
<translation>Parancs:</translation> <translation>Parancs:</translation>
</message> </message>
<message>
<source>Working Directory:</source>
<translation>Munka könyvtár:</translation>
</message>
<message> <message>
<source>Command Arguments:</source> <source>Command Arguments:</source>
<translation>Parancs argumentumok:</translation> <translation>Parancs argumentumok:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPage</name>
<message> <message>
<source>Build and Run</source> <source>Build and Run</source>
<translation>Építés és futtatás</translation> <translation>Építés és futtatás</translation>
@@ -11851,13 +11717,6 @@ Ok: %2</translation>
<source>Projects</source> <source>Projects</source>
<translation>Projektek</translation> <translation>Projektek</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPageUi</name>
<message>
<source>Build and Run</source>
<translation>Építés és futtatás</translation>
</message>
<message> <message>
<source>Save all files before Build</source> <source>Save all files before Build</source>
<translation>Az összes fájl mentése építés előtt</translation> <translation>Az összes fájl mentése építés előtt</translation>
@@ -11878,16 +11737,10 @@ Ok: %2</translation>
<source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source> <source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source>
<translation>&lt;i&gt;jom&lt;/i&gt; egy megérkezett leváltás az &lt;i&gt;nmake&lt;/i&gt;-re, amelyik elosztja a fordítási folyamatot több CPU mag számára. További részletekért tekintse meg a &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Honlapot&lt;/a&gt;. Tiltsa le, ha problémát tapasztal az építésnél.</translation> <translation>&lt;i&gt;jom&lt;/i&gt; egy megérkezett leváltás az &lt;i&gt;nmake&lt;/i&gt;-re, amelyik elosztja a fordítási folyamatot több CPU mag számára. További részletekért tekintse meg a &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Honlapot&lt;/a&gt;. Tiltsa le, ha problémát tapasztal az építésnél.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileFactory</name>
<message> <message>
<source>Could not open the following project: &apos;%1&apos;</source> <source>Could not open the following project: &apos;%1&apos;</source>
<translation>A következő projekt megnyitása nem sikerült: &apos;%1&apos;</translation> <translation>A következő projekt megnyitása nem sikerült: &apos;%1&apos;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileWizardExtension</name>
<message> <message>
<source>Failed to add one or more files to project <source>Failed to add one or more files to project
&apos;%1&apos; (%2).</source> &apos;%1&apos; (%2).</source>
@@ -11898,9 +11751,6 @@ Ok: %2</translation>
<source>Failed to add &apos;%1&apos; to the version control system.</source> <source>Failed to add &apos;%1&apos; to the version control system.</source>
<translation>A(z) &apos;%1&apos; hozzáadása nem sikerült a verziókövetőhöz.</translation> <translation>A(z) &apos;%1&apos; hozzáadása nem sikerült a verziókövetőhöz.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectLabel</name>
<message> <message>
<source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source> <source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source>
<translation>Projekt beállítások a(z) &lt;b&gt;%1&lt;/b&gt; projektre szerkesztése</translation> <translation>Projekt beállítások a(z) &lt;b&gt;%1&lt;/b&gt; projektre szerkesztése</translation>
@@ -11909,16 +11759,10 @@ Ok: %2</translation>
<source>No Project loaded</source> <source>No Project loaded</source>
<translation>Nincs Projekt betöltve</translation> <translation>Nincs Projekt betöltve</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectPushButton</name>
<message> <message>
<source>Select Project</source> <source>Select Project</source>
<translation>Projekt kiválasztása</translation> <translation>Projekt kiválasztása</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidget</name>
<message> <message>
<source>Simplify tree</source> <source>Simplify tree</source>
<translation>Fa egyszerűsítése</translation> <translation>Fa egyszerűsítése</translation>
@@ -11931,27 +11775,14 @@ Ok: %2</translation>
<source>Synchronize with Editor</source> <source>Synchronize with Editor</source>
<translation>Mit Editor synchronisieren</translation> <translation>Mit Editor synchronisieren</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidgetFactory</name>
<message>
<source>Projects</source>
<translation>Projektek</translation>
</message>
<message> <message>
<source>Filter tree</source> <source>Filter tree</source>
<translation>Szűrő fa</translation> <translation>Szűrő fa</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePage</name>
<message> <message>
<source>Develop</source> <source>Develop</source>
<translation>Fejlesztés</translation> <translation>Fejlesztés</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePageWidget</name>
<message> <message>
<source>Form</source> <source>Form</source>
<translation>Forma</translation> <translation>Forma</translation>
@@ -11984,9 +11815,6 @@ Ok: %2</translation>
<source>New Project...</source> <source>New Project...</source>
<translation>Új Projekt...</translation> <translation>Új Projekt...</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWindow</name>
<message> <message>
<source>Active Build and Run Configurations</source> <source>Active Build and Run Configurations</source>
<translation>Aktív építés és konfigurációk futtatása</translation> <translation>Aktív építés és konfigurációk futtatása</translation>
@@ -11995,9 +11823,6 @@ Ok: %2</translation>
<source>No project loaded.</source> <source>No project loaded.</source>
<translation>Nincs Projekt betöltve.</translation> <translation>Nincs Projekt betöltve.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWizardPage</name>
<message> <message>
<source>Add to &amp;VCS (%1)</source> <source>Add to &amp;VCS (%1)</source>
<translation>Hozzáadás &amp;VC-hez (%1)</translation> <translation>Hozzáadás &amp;VC-hez (%1)</translation>
@@ -12006,9 +11831,6 @@ Ok: %2</translation>
<source>Files to be added:</source> <source>Files to be added:</source>
<translation>A hozzáadni kívánt fájlok:</translation> <translation>A hozzáadni kívánt fájlok:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RemoveFileDialog</name>
<message> <message>
<source>Remove File</source> <source>Remove File</source>
<translation>Fájl eltávolítás</translation> <translation>Fájl eltávolítás</translation>
@@ -12025,16 +11847,10 @@ Ok: %2</translation>
<source>&amp;Remove from Version Control</source> <source>&amp;Remove from Version Control</source>
<translation>Verzió követőből való &amp;eltávolítás</translation> <translation>Verzió követőből való &amp;eltávolítás</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPanel</name>
<message> <message>
<source>Run Settings</source> <source>Run Settings</source>
<translation>Beállítások futtatása</translation> <translation>Beállítások futtatása</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPropertiesPage</name>
<message> <message>
<source>Edit run configuration:</source> <source>Edit run configuration:</source>
<translation>Futtatás konfiguráció szerkesztése:</translation> <translation>Futtatás konfiguráció szerkesztése:</translation>
@@ -12047,24 +11863,6 @@ Ok: %2</translation>
<source>-</source> <source>-</source>
<translation>-</translation> <translation>-</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsWidget</name>
<message>
<source>Add</source>
<translation>Hozzáadás</translation>
</message>
<message>
<source>Remove</source>
<translation>Eltávolítás</translation>
</message>
<message>
<source>&lt;a href=&quot;#&quot;&gt;Make %1 active.&lt;/a&gt;</source>
<translation>&lt;a href=&quot;#&quot;&gt;Make %1 aktív.&lt;/a&gt;</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionDialog</name>
<message> <message>
<source>Session Manager</source> <source>Session Manager</source>
<translation>Szakasz kezelő</translation> <translation>Szakasz kezelő</translation>
@@ -12089,9 +11887,6 @@ Ok: %2</translation>
<source>Switch to session</source> <source>Switch to session</source>
<translation>Szakasz kapcsolása</translation> <translation>Szakasz kapcsolása</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionFile</name>
<message> <message>
<source>Session</source> <source>Session</source>
<translation>Szakasz</translation> <translation>Szakasz</translation>
@@ -12101,16 +11896,10 @@ Ok: %2</translation>
<comment>default file name to display</comment> <comment>default file name to display</comment>
<translation>Címtelen</translation> <translation>Címtelen</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskDelegate</name>
<message> <message>
<source>File not found: %1</source> <source>File not found: %1</source>
<translation>A fájl nem található: %1</translation> <translation>A fájl nem található: %1</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskWindow</name>
<message> <message>
<source>Build Issues</source> <source>Build Issues</source>
<translation>Építési problémák</translation> <translation>Építési problémák</translation>
@@ -12123,9 +11912,6 @@ Ok: %2</translation>
<source>Show Warnings</source> <source>Show Warnings</source>
<translation>Figyelmeztetések megjelenítése</translation> <translation>Figyelmeztetések megjelenítése</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WinGuiProcess</name>
<message> <message>
<source>The process could not be started!</source> <source>The process could not be started!</source>
<translation>Nem sikerült elindítani a folyamatot!</translation> <translation>Nem sikerült elindítani a folyamatot!</translation>
@@ -12134,9 +11920,6 @@ Ok: %2</translation>
<source>Cannot retrieve debugging output!</source> <source>Cannot retrieve debugging output!</source>
<translation>Nem sikerült kinyerni a debug kimeneteket!</translation> <translation>Nem sikerült kinyerni a debug kimeneteket!</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WizardPage</name>
<message> <message>
<source>Project management</source> <source>Project management</source>
<translation>Projekt vezetés</translation> <translation>Projekt vezetés</translation>
@@ -12161,13 +11944,6 @@ Ok: %2</translation>
</source> </source>
<translation>A következő fájlok lesznek hozzáadva:</translation> <translation>A következő fájlok lesznek hozzáadva:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::ProjectExplorerPlugin</name>
<message>
<source>Projects</source>
<translation>Projektek</translation>
</message>
<message> <message>
<source>&amp;Build</source> <source>&amp;Build</source>
<translation>&amp;Építés</translation> <translation>&amp;Építés</translation>
@@ -12188,10 +11964,6 @@ Ok: %2</translation>
<source>Session Manager...</source> <source>Session Manager...</source>
<translation>Szakasz kezelő...</translation> <translation>Szakasz kezelő...</translation>
</message> </message>
<message>
<source>New Project...</source>
<translation>Új Projekt...</translation>
</message>
<message> <message>
<source>Ctrl+Shift+N</source> <source>Ctrl+Shift+N</source>
<translation>Ctrl+Shift+H</translation> <translation>Ctrl+Shift+H</translation>
@@ -12236,10 +12008,6 @@ Ok: %2</translation>
<source>Close All Projects</source> <source>Close All Projects</source>
<translation>Az összes projekt bezárása</translation> <translation>Az összes projekt bezárása</translation>
</message> </message>
<message>
<source>Session</source>
<translation>Szakasz</translation>
</message>
<message> <message>
<source>Set Build Configuration</source> <source>Set Build Configuration</source>
<translation>Építési konfiguráció beállítása</translation> <translation>Építési konfiguráció beállítása</translation>
@@ -12300,10 +12068,6 @@ Ok: %2</translation>
<source>Clean Without Dependencies</source> <source>Clean Without Dependencies</source>
<translation>Függőségek nélküli tisztogatás</translation> <translation>Függőségek nélküli tisztogatás</translation>
</message> </message>
<message>
<source>Run</source>
<translation>Futtatás</translation>
</message>
<message> <message>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
@@ -12422,9 +12186,6 @@ a verziókövetőhöz (%2)?</translation>
<source>Could not delete file %1.</source> <source>Could not delete file %1.</source>
<translation>Nem sikerült törölni a(z) %1 fájlt.</translation> <translation>Nem sikerült törölni a(z) %1 fájlt.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::SessionManager</name>
<message> <message>
<source>Error while restoring session</source> <source>Error while restoring session</source>
<translation>Hiba történt a szakasz visszaállítása közben</translation> <translation>Hiba történt a szakasz visszaállítása közben</translation>

View File

@@ -3971,7 +3971,7 @@ L&apos;utilizzo di gdb 6.7 o successivi è fortemente consigliato.</translation>
</message> </message>
</context> </context>
<context> <context>
<name>DependenciesModel</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Unable to add dependency</source> <source>Unable to add dependency</source>
<translation>Impossibile aggiungere la dipendenza</translation> <translation>Impossibile aggiungere la dipendenza</translation>
@@ -3980,9 +3980,6 @@ L&apos;utilizzo di gdb 6.7 o successivi è fortemente consigliato.</translation>
<source>This would create a circular dependency.</source> <source>This would create a circular dependency.</source>
<translation>Questo creerebbe una dipendenza circolare.</translation> <translation>Questo creerebbe una dipendenza circolare.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesWidget</name>
<message> <message>
<source>%1 has no dependencies.</source> <source>%1 has no dependencies.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -6718,7 +6715,7 @@ Nome di base della libreria: %1</translation>
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::AbstractProcessStep</name> <name>::ProjectExplorer</name>
<message> <message>
<source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt; <source>&lt;font color=&quot;#0000ff&quot;&gt;Starting: %1 %2&lt;/font&gt;
</source> </source>
@@ -6737,9 +6734,6 @@ Nome di base della libreria: %1</translation>
<source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source> <source>&lt;font color=&quot;#ff0000&quot;&gt;Could not start process %1 &lt;/b&gt;&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#ff0000&quot;&gt;Impossibile avviare il processo %1 &lt;/b&gt;&lt;/font&gt;</translation> <translation>&lt;font color=&quot;#ff0000&quot;&gt;Impossibile avviare il processo %1 &lt;/b&gt;&lt;/font&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::BuildManager</name>
<message> <message>
<source>&lt;font color=&quot;#ff0000&quot;&gt;Canceled build.&lt;/font&gt;</source> <source>&lt;font color=&quot;#ff0000&quot;&gt;Canceled build.&lt;/font&gt;</source>
<translation>&lt;font color=&quot;#ff0000&quot;&gt;Compilazione annullata.&lt;/font&gt;</translation> <translation>&lt;font color=&quot;#ff0000&quot;&gt;Compilazione annullata.&lt;/font&gt;</translation>
@@ -6771,9 +6765,6 @@ Nome di base della libreria: %1</translation>
<source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source> <source>&lt;b&gt;Running build steps for project %2...&lt;/b&gt;</source>
<translation>&lt;b&gt;Avvio delle fasi di compilazione del progetto %2...&lt;/b&gt;</translation> <translation>&lt;b&gt;Avvio delle fasi di compilazione del progetto %2...&lt;/b&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfiguration</name>
<message> <message>
<source>Custom Executable</source> <source>Custom Executable</source>
<translation>Eseguibile Speciale</translation> <translation>Eseguibile Speciale</translation>
@@ -6786,16 +6777,6 @@ Nome di base della libreria: %1</translation>
<source>Run %1</source> <source>Run %1</source>
<translation>Esegui %1</translation> <translation>Esegui %1</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::CustomExecutableRunConfigurationFactory</name>
<message>
<source>Custom Executable</source>
<translation>Eseguibile Speciale</translation>
</message>
</context>
<context>
<name>ProjectExplorer::EnvironmentModel</name>
<message> <message>
<source>&lt;UNSET&gt;</source> <source>&lt;UNSET&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -6816,9 +6797,6 @@ Nome di base della libreria: %1</translation>
<source>&lt;VALUE&gt;</source> <source>&lt;VALUE&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::EnvironmentWidget</name>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished">&amp;Modifica</translation> <translation type="unfinished">&amp;Modifica</translation>
@@ -6847,16 +6825,10 @@ Nome di base della libreria: %1</translation>
<source>Summary: No changes to Environment</source> <source>Summary: No changes to Environment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFilter</name>
<message> <message>
<source>Files in any project</source> <source>Files in any project</source>
<translation>File in tutti i progetti</translation> <translation>File in tutti i progetti</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::AllProjectsFind</name>
<message> <message>
<source>All Projects</source> <source>All Projects</source>
<translation>Tutti i Progetti</translation> <translation>Tutti i Progetti</translation>
@@ -6865,9 +6837,6 @@ Nome di base della libreria: %1</translation>
<source>File &amp;pattern:</source> <source>File &amp;pattern:</source>
<translation>&amp;Schema file:</translation> <translation>&amp;Schema file:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationLauncher</name>
<message> <message>
<source>Failed to start program. Path or permissions wrong?</source> <source>Failed to start program. Path or permissions wrong?</source>
<translation type="obsolete">Non è possibile avviare il programma. Il percorso o i permessi sono errati?</translation> <translation type="obsolete">Non è possibile avviare il programma. Il percorso o i permessi sono errati?</translation>
@@ -6880,16 +6849,10 @@ Nome di base della libreria: %1</translation>
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation type="obsolete">C&apos;è stato un errore durante l&apos;esecuzione del programma.</translation> <translation type="obsolete">C&apos;è stato un errore durante l&apos;esecuzione del programma.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationRunConfigurationRunner</name>
<message> <message>
<source>Run</source> <source>Run</source>
<translation type="obsolete">Esegui</translation> <translation type="obsolete">Esegui</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ApplicationRunControl</name>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation type="obsolete">Avvio di %1...</translation> <translation type="obsolete">Avvio di %1...</translation>
@@ -6898,16 +6861,10 @@ Nome di base della libreria: %1</translation>
<source>%1 exited with code %2</source> <source>%1 exited with code %2</source>
<translation type="obsolete">%1 è uscito con il codice %2</translation> <translation type="obsolete">%1 è uscito con il codice %2</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsPanel</name>
<message> <message>
<source>Build Settings</source> <source>Build Settings</source>
<translation>Impostazioni di Compilazione</translation> <translation>Impostazioni di Compilazione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsPropertiesPage</name>
<message> <message>
<source>Configurations</source> <source>Configurations</source>
<translation type="obsolete">Configurazioni</translation> <translation type="obsolete">Configurazioni</translation>
@@ -6920,9 +6877,6 @@ Nome di base della libreria: %1</translation>
<source>-</source> <source>-</source>
<translation type="obsolete">-</translation> <translation type="obsolete">-</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildSettingsWidget</name>
<message> <message>
<source>Create &amp;New</source> <source>Create &amp;New</source>
<translation type="obsolete">Crea &amp;Nuovo</translation> <translation type="obsolete">Crea &amp;Nuovo</translation>
@@ -6983,21 +6937,10 @@ Nome di base della libreria: %1</translation>
<source>Clone configuration</source> <source>Clone configuration</source>
<translation>Clona la configurazione</translation> <translation>Clona la configurazione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::BuildStepsPage</name>
<message> <message>
<source>1</source> <source>1</source>
<translation type="obsolete">1</translation> <translation type="obsolete">1</translation>
</message> </message>
<message>
<source>+</source>
<translation type="obsolete">+</translation>
</message>
<message>
<source>-</source>
<translation type="obsolete">-</translation>
</message>
<message> <message>
<source>^</source> <source>^</source>
<translation type="obsolete">^</translation> <translation type="obsolete">^</translation>
@@ -7026,24 +6969,10 @@ Nome di base della libreria: %1</translation>
<source>Remove build step</source> <source>Remove build step</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Build Steps</source>
<translation>Fasi di Compilazione</translation>
</message>
<message>
<source>Clean Steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::CompileOutputWindow</name>
<message> <message>
<source>Compile Output</source> <source>Compile Output</source>
<translation>Output di Compilazione</translation> <translation>Output di Compilazione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild</name>
<message> <message>
<source>Cancel Build &amp;&amp; Close</source> <source>Cancel Build &amp;&amp; Close</source>
<translation>Annulla la Compilazione &amp;&amp; Chiudi</translation> <translation>Annulla la Compilazione &amp;&amp; Chiudi</translation>
@@ -7068,27 +6997,14 @@ Nome di base della libreria: %1</translation>
<source>Do you want to cancel the build process and close Qt Creator anyway?</source> <source>Do you want to cancel the build process and close Qt Creator anyway?</source>
<translation>Vuoi annullare il processo di compilazione e chiudere Qt Creator comunque?</translation> <translation>Vuoi annullare il processo di compilazione e chiudere Qt Creator comunque?</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFilter</name>
<message> <message>
<source>Files in current project</source> <source>Files in current project</source>
<translation>File nel progetto corrente</translation> <translation>File nel progetto corrente</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::CurrentProjectFind</name>
<message> <message>
<source>Current Project</source> <source>Current Project</source>
<translation>Progetto Corrente</translation> <translation>Progetto Corrente</translation>
</message> </message>
<message>
<source>File &amp;pattern:</source>
<translation>&amp;Schema file:</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::CustomExecutableConfigurationWidget</name>
<message> <message>
<source>Name:</source> <source>Name:</source>
<translation>Nome:</translation> <translation>Nome:</translation>
@@ -7137,16 +7053,10 @@ Nome di base della libreria: %1</translation>
<source>Running executable: &lt;b&gt;%1&lt;/b&gt; %2</source> <source>Running executable: &lt;b&gt;%1&lt;/b&gt; %2</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DependenciesPanel</name>
<message> <message>
<source>Dependencies</source> <source>Dependencies</source>
<translation>Dipendenze</translation> <translation>Dipendenze</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::DetailedModel</name>
<message> <message>
<source>%1 of project %2</source> <source>%1 of project %2</source>
<translation>%1 del progetto %2</translation> <translation>%1 del progetto %2</translation>
@@ -7159,16 +7069,10 @@ Nome di base della libreria: %1</translation>
<source>Renaming file %1 to %2 failed.</source> <source>Renaming file %1 to %2 failed.</source>
<translation>Non è stato possibile rinominare %1 in %2.</translation> <translation>Non è stato possibile rinominare %1 in %2.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPanel</name>
<message> <message>
<source>Editor Settings</source> <source>Editor Settings</source>
<translation>Impostazioni dell&apos;Editor</translation> <translation>Impostazioni dell&apos;Editor</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::EditorSettingsPropertiesPage</name>
<message> <message>
<source>Default File Encoding:</source> <source>Default File Encoding:</source>
<translation>Codifica File Predefinita:</translation> <translation>Codifica File Predefinita:</translation>
@@ -7186,7 +7090,7 @@ Nome di base della libreria: %1</translation>
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::Internal::NewSessionInputDialog</name> <name>::ProjectExplorer</name>
<message> <message>
<source>New session name</source> <source>New session name</source>
<translation>Nome della nuova sessione</translation> <translation>Nome della nuova sessione</translation>
@@ -7195,9 +7099,6 @@ Nome di base della libreria: %1</translation>
<source>Enter the name of the new session:</source> <source>Enter the name of the new session:</source>
<translation>Inserisci il nome della nuova sessione:</translation> <translation>Inserisci il nome della nuova sessione:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionDialog</name>
<message> <message>
<source>Switch to session</source> <source>Switch to session</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -7226,9 +7127,6 @@ Nome di base della libreria: %1</translation>
<source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source> <source>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;What is a Session?&lt;/a&gt;</source>
<translation>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;Cos&apos;è una Sessione?&lt;/a&gt;</translation> <translation>&lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-quick-tour.html#session-management-in-qt-creator&quot;&gt;Cos&apos;è una Sessione?&lt;/a&gt;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputPane</name>
<message> <message>
<source>Re-run this run-configuration</source> <source>Re-run this run-configuration</source>
<translation>Riavvia questa esecuzione</translation> <translation>Riavvia questa esecuzione</translation>
@@ -7253,16 +7151,10 @@ Nome di base della libreria: %1</translation>
<source>Unable to close</source> <source>Unable to close</source>
<translation>Impossibile chiudere</translation> <translation>Impossibile chiudere</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::OutputWindow</name>
<message> <message>
<source>Application Output Window</source> <source>Application Output Window</source>
<translation>Finestra di Output dell&apos;Applicazione</translation> <translation>Finestra di Output dell&apos;Applicazione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStep</name>
<message> <message>
<source>Custom Process Step</source> <source>Custom Process Step</source>
<translation>Fase Speciale</translation> <translation>Fase Speciale</translation>
@@ -7272,9 +7164,6 @@ Nome di base della libreria: %1</translation>
<comment>item in combobox</comment> <comment>item in combobox</comment>
<translation type="unfinished">Fase Speciale</translation> <translation type="unfinished">Fase Speciale</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepConfigWidget</name>
<message> <message>
<source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source> <source>&lt;b&gt;%1&lt;/b&gt; %2 %3 %4</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -7283,17 +7172,10 @@ Nome di base della libreria: %1</translation>
<source>(disabled)</source> <source>(disabled)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProcessStepWidget</name>
<message> <message>
<source>Enable custom process step</source> <source>Enable custom process step</source>
<translation type="obsolete">Abilita fase speciale</translation> <translation type="obsolete">Abilita fase speciale</translation>
</message> </message>
<message>
<source>Name:</source>
<translation>Nome:</translation>
</message>
<message> <message>
<location/> <location/>
<source>Command:</source> <source>Command:</source>
@@ -7314,9 +7196,6 @@ Nome di base della libreria: %1</translation>
<source>Enable Custom Process Step</source> <source>Enable Custom Process Step</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPage</name>
<message> <message>
<source>Build and Run</source> <source>Build and Run</source>
<translation>Compila ed Esegui</translation> <translation>Compila ed Esegui</translation>
@@ -7329,16 +7208,10 @@ Nome di base della libreria: %1</translation>
<source>Projectexplorer</source> <source>Projectexplorer</source>
<translation type="obsolete">Projectexplorer</translation> <translation type="obsolete">Projectexplorer</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileFactory</name>
<message> <message>
<source>Could not open the following project: &apos;%1&apos;</source> <source>Could not open the following project: &apos;%1&apos;</source>
<translation>Non è stato possibile aprire il progetto: &apos;%1&apos;</translation> <translation>Non è stato possibile aprire il progetto: &apos;%1&apos;</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectFileWizardExtension</name>
<message> <message>
<source>Failed to add one or more files to project <source>Failed to add one or more files to project
&apos;%1&apos; (%2).</source> &apos;%1&apos; (%2).</source>
@@ -7349,9 +7222,6 @@ Nome di base della libreria: %1</translation>
<source>Failed to add &apos;%1&apos; to the version control system.</source> <source>Failed to add &apos;%1&apos; to the version control system.</source>
<translation>Non è stato possibile aggiungere &apos;%1&apos; al sistema di revisione del codice.</translation> <translation>Non è stato possibile aggiungere &apos;%1&apos; al sistema di revisione del codice.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidget</name>
<message> <message>
<source>Simplify tree</source> <source>Simplify tree</source>
<translation>Semplifica albero</translation> <translation>Semplifica albero</translation>
@@ -7364,9 +7234,6 @@ Nome di base della libreria: %1</translation>
<source>Synchronize with Editor</source> <source>Synchronize with Editor</source>
<translation>Sincronizza con l&apos;Editor</translation> <translation>Sincronizza con l&apos;Editor</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectTreeWidgetFactory</name>
<message> <message>
<source>Projects</source> <source>Projects</source>
<translation>Progetti</translation> <translation>Progetti</translation>
@@ -7375,9 +7242,6 @@ Nome di base della libreria: %1</translation>
<source>Filter tree</source> <source>Filter tree</source>
<translation>Filtra l&apos;albero</translation> <translation>Filtra l&apos;albero</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWindow</name>
<message> <message>
<source>Project Explorer</source> <source>Project Explorer</source>
<translation type="obsolete">Progetto</translation> <translation type="obsolete">Progetto</translation>
@@ -7402,9 +7266,6 @@ Nome di base della libreria: %1</translation>
<source>No project loaded.</source> <source>No project loaded.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWizardPage</name>
<message> <message>
<source>Add to &amp;VCS (%1)</source> <source>Add to &amp;VCS (%1)</source>
<translation>Aggiungi al &amp;VCS (%1)</translation> <translation>Aggiungi al &amp;VCS (%1)</translation>
@@ -7413,9 +7274,6 @@ Nome di base della libreria: %1</translation>
<source>Files to be added:</source> <source>Files to be added:</source>
<translation>File da aggiungere:</translation> <translation>File da aggiungere:</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjetExplorerSettingsPageUi</name>
<message> <message>
<source>Save all files before Build</source> <source>Save all files before Build</source>
<translation type="obsolete">Salva tutti i file prima della Compilazione</translation> <translation type="obsolete">Salva tutti i file prima della Compilazione</translation>
@@ -7428,9 +7286,6 @@ Nome di base della libreria: %1</translation>
<source>Build and Run</source> <source>Build and Run</source>
<translation type="obsolete">Compila ed Esegui</translation> <translation type="obsolete">Compila ed Esegui</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RemoveFileDialog</name>
<message> <message>
<source>Remove File</source> <source>Remove File</source>
<translation>Rimozione del File</translation> <translation>Rimozione del File</translation>
@@ -7450,27 +7305,10 @@ Nome di base della libreria: %1</translation>
<source>&amp;Remove from Version Control</source> <source>&amp;Remove from Version Control</source>
<translation>&amp;Rimuovi dal sistema di revisione</translation> <translation>&amp;Rimuovi dal sistema di revisione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPanel</name>
<message> <message>
<source>Run Settings</source> <source>Run Settings</source>
<translation>Impostazioni di Esecuzione</translation> <translation>Impostazioni di Esecuzione</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsWidget</name>
<message>
<source>Add</source>
<translation type="unfinished">Aggiungi</translation>
</message>
<message>
<source>Remove</source>
<translation type="unfinished">Rimuovi</translation>
</message>
</context>
<context>
<name>ProjectExplorer::Internal::RunSettingsPropertiesPage</name>
<message> <message>
<source>Run &amp;configuration:</source> <source>Run &amp;configuration:</source>
<translation type="obsolete">Ese&amp;cuzione di:</translation> <translation type="obsolete">Ese&amp;cuzione di:</translation>
@@ -7493,9 +7331,6 @@ Nome di base della libreria: %1</translation>
<source>Edit run configuration:</source> <source>Edit run configuration:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::SessionFile</name>
<message> <message>
<source>Session</source> <source>Session</source>
<translation>Sessione</translation> <translation>Sessione</translation>
@@ -7505,16 +7340,10 @@ Nome di base della libreria: %1</translation>
<comment>default file name to display</comment> <comment>default file name to display</comment>
<translation>Senza titolo</translation> <translation>Senza titolo</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskDelegate</name>
<message> <message>
<source>File not found: %1</source> <source>File not found: %1</source>
<translation>File non trovato: %1</translation> <translation>File non trovato: %1</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::TaskWindow</name>
<message> <message>
<source>Build Issues</source> <source>Build Issues</source>
<translation>Problemi di Compilazione</translation> <translation>Problemi di Compilazione</translation>
@@ -7527,9 +7356,6 @@ Nome di base della libreria: %1</translation>
<source>Show Warnings</source> <source>Show Warnings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WinGuiProcess</name>
<message> <message>
<source>The process could not be started!</source> <source>The process could not be started!</source>
<translation>Non è stato possibile avviare il processo!</translation> <translation>Non è stato possibile avviare il processo!</translation>
@@ -7538,9 +7364,6 @@ Nome di base della libreria: %1</translation>
<source>Cannot retrieve debugging output!</source> <source>Cannot retrieve debugging output!</source>
<translation>Non è possibile recuperare l&apos;output di debug!</translation> <translation>Non è possibile recuperare l&apos;output di debug!</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::WizardPage</name>
<message> <message>
<source>Project management</source> <source>Project management</source>
<translation>Gestione progetto</translation> <translation>Gestione progetto</translation>
@@ -7573,13 +7396,6 @@ Nome di base della libreria: %1</translation>
</translation> </translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::ProjectExplorerPlugin</name>
<message>
<source>Projects</source>
<translation>Progetti</translation>
</message>
<message> <message>
<source>&amp;Build</source> <source>&amp;Build</source>
<translation>&amp;Compila</translation> <translation>&amp;Compila</translation>
@@ -7644,10 +7460,6 @@ Nome di base della libreria: %1</translation>
<source>Close All Projects</source> <source>Close All Projects</source>
<translation>Chiudi Tutti i Progetti</translation> <translation>Chiudi Tutti i Progetti</translation>
</message> </message>
<message>
<source>Session</source>
<translation>Sessione</translation>
</message>
<message> <message>
<source>Set Build Configuration</source> <source>Set Build Configuration</source>
<translation>Compilazione di</translation> <translation>Compilazione di</translation>
@@ -7838,9 +7650,6 @@ al VCS (%2)?</translation>
<source>Could not delete file %1.</source> <source>Could not delete file %1.</source>
<translation>Non è stato possibile cancellare il file %1.</translation> <translation>Non è stato possibile cancellare il file %1.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::SessionManager</name>
<message> <message>
<source>Error while restoring session</source> <source>Error while restoring session</source>
<translation>Errore durante il ripristino della sessione</translation> <translation>Errore durante il ripristino della sessione</translation>
@@ -11340,7 +11149,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::Internal::ProjectExplorerSettingsPageUi</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Build and Run</source> <source>Build and Run</source>
<translation type="unfinished">Compila ed Esegui</translation> <translation type="unfinished">Compila ed Esegui</translation>
@@ -11370,9 +11179,6 @@ p, li { white-space: pre-wrap; }
<source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source> <source>&lt;i&gt;jom&lt;/i&gt; is a drop-in replacement for &lt;i&gt;nmake&lt;/i&gt; which distributes the compilation process to multiple CPU cores. For more details, see the &lt;a href=&quot;http://qt.gitorious.org/qt-labs/jom/&quot;&gt;jom Homepage&lt;/a&gt;. Disable it if you experience problems with your builds.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePageWidget</name>
<message> <message>
<source>Form</source> <source>Form</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -12485,7 +12291,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>ProjectExplorer::ApplicationLauncher</name> <name>::ProjectExplorer</name>
<message> <message>
<source>Failed to start program. Path or permissions wrong?</source> <source>Failed to start program. Path or permissions wrong?</source>
<translation type="unfinished">Non è possibile avviare il programma. Il percorso o i permessi sono errati?</translation> <translation type="unfinished">Non è possibile avviare il programma. Il percorso o i permessi sono errati?</translation>
@@ -12498,16 +12304,10 @@ p, li { white-space: pre-wrap; }
<source>Some error has occurred while running the program.</source> <source>Some error has occurred while running the program.</source>
<translation type="unfinished">C&apos;è stato un errore durante l&apos;esecuzione del programma.</translation> <translation type="unfinished">C&apos;è stato un errore durante l&apos;esecuzione del programma.</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::LocalApplicationRunControlFactory</name>
<message> <message>
<source>Run</source> <source>Run</source>
<translation type="unfinished">Esegui</translation> <translation type="unfinished">Esegui</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::LocalApplicationRunControl</name>
<message> <message>
<source>Starting %1...</source> <source>Starting %1...</source>
<translation type="unfinished">Avvio di %1...</translation> <translation type="unfinished">Avvio di %1...</translation>
@@ -12516,9 +12316,6 @@ p, li { white-space: pre-wrap; }
<source>%1 exited with code %2</source> <source>%1 exited with code %2</source>
<translation type="unfinished">%1 è uscito con il codice %2</translation> <translation type="unfinished">%1 è uscito con il codice %2</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::DebuggingHelperLibrary</name>
<message> <message>
<source>The target directory %1 could not be created.</source> <source>The target directory %1 could not be created.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -12558,23 +12355,14 @@ Reason: %2</source>
</source> </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectWelcomePage</name>
<message> <message>
<source>Develop</source> <source>Develop</source>
<translation type="unfinished">Sviluppa</translation> <translation type="unfinished">Sviluppa</translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ActiveConfigurationWidget</name>
<message> <message>
<source>Active run configuration</source> <source>Active run configuration</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectLabel</name>
<message> <message>
<source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source> <source>Edit Project Settings for Project &lt;b&gt;%1&lt;/b&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@@ -12583,9 +12371,6 @@ Reason: %2</source>
<source>No Project loaded</source> <source>No Project loaded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ProjectExplorer::Internal::ProjectPushButton</name>
<message> <message>
<source>Select Project</source> <source>Select Project</source>
<translation type="unfinished"></translation> <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

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

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "abiwidget.h" #include "abiwidget.h"
#include "abi.h" #include "abi.h"
#include "projectexplorertr.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/guard.h> #include <utils/guard.h>
@@ -184,7 +186,7 @@ void AbiWidget::setAbis(const Abis &abiList, const Abi &currentAbi)
// Initial setup of ABI combobox: // Initial setup of ABI combobox:
d->m_abi->clear(); d->m_abi->clear();
d->m_abi->addItem(tr("<custom>"), defaultAbi.toString()); d->m_abi->addItem(Tr::tr("<custom>"), defaultAbi.toString());
d->m_abi->setCurrentIndex(0); d->m_abi->setCurrentIndex(0);
d->m_abi->setVisible(!abiList.isEmpty()); d->m_abi->setVisible(!abiList.isEmpty());

View File

@@ -2,11 +2,13 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "abstractprocessstep.h" #include "abstractprocessstep.h"
#include "buildconfiguration.h" #include "buildconfiguration.h"
#include "buildstep.h" #include "buildstep.h"
#include "processparameters.h" #include "processparameters.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorersettings.h" #include "projectexplorersettings.h"
#include "projectexplorertr.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/outputformatter.h> #include <utils/outputformatter.h>
@@ -101,7 +103,7 @@ AbstractProcessStep::~AbstractProcessStep()
void AbstractProcessStep::emitFaultyConfigurationMessage() void AbstractProcessStep::emitFaultyConfigurationMessage()
{ {
emit addOutput(tr("Configuration is faulty. Check the Issues view for details."), emit addOutput(Tr::tr("Configuration is faulty. Check the Issues view for details."),
OutputFormat::NormalMessage); OutputFormat::NormalMessage);
} }
@@ -191,7 +193,7 @@ bool AbstractProcessStep::checkWorkingDirectory()
const FilePath wd = d->m_param.effectiveWorkingDirectory(); const FilePath wd = d->m_param.effectiveWorkingDirectory();
if (!wd.exists()) { if (!wd.exists()) {
if (!wd.createDir()) { if (!wd.createDir()) {
emit addOutput(tr("Could not create directory \"%1\"").arg(wd.toUserOutput()), emit addOutput(Tr::tr("Could not create directory \"%1\"").arg(wd.toUserOutput()),
OutputFormat::ErrorMessage); OutputFormat::ErrorMessage);
finish(ProcessResult::StartFailed); finish(ProcessResult::StartFailed);
return false; return false;
@@ -232,7 +234,7 @@ void AbstractProcessStep::setupProcess(QtcProcess *process)
}); });
connect(process, &QtcProcess::started, this, [this] { connect(process, &QtcProcess::started, this, [this] {
ProcessParameters *params = displayedParameters(); ProcessParameters *params = displayedParameters();
emit addOutput(tr("Starting: \"%1\" %2") emit addOutput(Tr::tr("Starting: \"%1\" %2")
.arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()), .arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()),
OutputFormat::NormalMessage); OutputFormat::NormalMessage);
}); });
@@ -269,7 +271,7 @@ void AbstractProcessStep::doCancel()
} }
if (d->m_taskTree) { if (d->m_taskTree) {
d->m_taskTree.reset(); d->m_taskTree.reset();
emit addOutput(tr("The build step was ended forcefully."), OutputFormat::ErrorMessage); emit addOutput(Tr::tr("The build step was ended forcefully."), OutputFormat::ErrorMessage);
emit finished(false); emit finished(false);
} }
} }
@@ -323,14 +325,14 @@ void AbstractProcessStep::Private::cleanUp(int exitCode, QProcess::ExitStatus st
{ {
const QString command = q->displayedParameters()->effectiveCommand().toUserOutput(); const QString command = q->displayedParameters()->effectiveCommand().toUserOutput();
if (status == QProcess::NormalExit && exitCode == 0) { if (status == QProcess::NormalExit && exitCode == 0) {
emit q->addOutput(tr("The process \"%1\" exited normally.").arg(command), emit q->addOutput(Tr::tr("The process \"%1\" exited normally.").arg(command),
OutputFormat::NormalMessage); OutputFormat::NormalMessage);
} else if (status == QProcess::NormalExit) { } else if (status == QProcess::NormalExit) {
emit q->addOutput(tr("The process \"%1\" exited with code %2.") emit q->addOutput(Tr::tr("The process \"%1\" exited with code %2.")
.arg(command, QString::number(exitCode)), .arg(command, QString::number(exitCode)),
OutputFormat::ErrorMessage); OutputFormat::ErrorMessage);
} else { } else {
emit q->addOutput(tr("The process \"%1\" crashed.").arg(command), emit q->addOutput(Tr::tr("The process \"%1\" crashed.").arg(command),
OutputFormat::ErrorMessage); OutputFormat::ErrorMessage);
} }
@@ -351,7 +353,7 @@ void AbstractProcessStep::Private::cleanUp(int exitCode, QProcess::ExitStatus st
void AbstractProcessStep::processStartupFailed() void AbstractProcessStep::processStartupFailed()
{ {
ProcessParameters *params = displayedParameters(); ProcessParameters *params = displayedParameters();
emit addOutput(tr("Could not start process \"%1\" %2.") emit addOutput(Tr::tr("Could not start process \"%1\" %2.")
.arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()), .arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()),
OutputFormat::ErrorMessage); OutputFormat::ErrorMessage);

View File

@@ -4,6 +4,7 @@
#include "addrunconfigdialog.h" #include "addrunconfigdialog.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include <utils/itemviews.h> #include <utils/itemviews.h>
@@ -27,7 +28,6 @@ const Qt::ItemDataRole IsCustomRole = Qt::UserRole;
class CandidateTreeItem : public TreeItem class CandidateTreeItem : public TreeItem
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::AddRunConfigDialog)
public: public:
CandidateTreeItem(const RunConfigurationCreationInfo &rci, const Target *target) CandidateTreeItem(const RunConfigurationCreationInfo &rci, const Target *target)
: m_creationInfo(rci), m_projectRoot(target->project()->projectDirectory()), : m_creationInfo(rci), m_projectRoot(target->project()->projectDirectory()),
@@ -50,7 +50,7 @@ private:
displayPath = m_creationInfo.projectFilePath; displayPath = m_creationInfo.projectFilePath;
QTC_CHECK(displayPath.isEmpty()); QTC_CHECK(displayPath.isEmpty());
} }
return displayPath.isEmpty() ? tr("[none]") : displayPath.toUserOutput(); return displayPath.isEmpty() ? Tr::tr("[none]") : displayPath.toUserOutput();
} }
return QVariant(); return QVariant();
} }
@@ -62,11 +62,10 @@ private:
class CandidatesModel : public TreeModel<TreeItem, CandidateTreeItem> class CandidatesModel : public TreeModel<TreeItem, CandidateTreeItem>
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::AddRunConfigDialog)
public: public:
CandidatesModel(Target *target, QObject *parent) : TreeModel(parent) CandidatesModel(Target *target, QObject *parent) : TreeModel(parent)
{ {
setHeader({tr("Name"), tr("Source")}); setHeader({Tr::tr("Name"), Tr::tr("Source")});
for (const RunConfigurationCreationInfo &rci for (const RunConfigurationCreationInfo &rci
: RunConfigurationFactory::creatorsForTarget(target)) { : RunConfigurationFactory::creatorsForTarget(target)) {
rootItem()->appendChild(new CandidateTreeItem(rci, target)); rootItem()->appendChild(new CandidateTreeItem(rci, target));
@@ -114,13 +113,13 @@ private:
AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent) AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent)
: QDialog(parent), m_view(new CandidatesTreeView(this)) : QDialog(parent), m_view(new CandidatesTreeView(this))
{ {
setWindowTitle(tr("Create Run Configuration")); setWindowTitle(Tr::tr("Create Run Configuration"));
const auto model = new CandidatesModel(target, this); const auto model = new CandidatesModel(target, this);
const auto proxyModel = new ProxyModel(this); const auto proxyModel = new ProxyModel(this);
proxyModel->setSourceModel(model); proxyModel->setSourceModel(model);
const auto filterEdit = new FancyLineEdit(this); const auto filterEdit = new FancyLineEdit(this);
filterEdit->setFiltering(true); filterEdit->setFiltering(true);
filterEdit->setPlaceholderText(tr("Filter candidates by name")); filterEdit->setPlaceholderText(Tr::tr("Filter candidates by name"));
m_view->setSelectionMode(TreeView::SingleSelection); m_view->setSelectionMode(TreeView::SingleSelection);
m_view->setSelectionBehavior(TreeView::SelectRows); m_view->setSelectionBehavior(TreeView::SelectRows);
m_view->setSortingEnabled(true); m_view->setSortingEnabled(true);
@@ -129,7 +128,7 @@ AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent)
m_view->resizeColumnToContents(1); m_view->resizeColumnToContents(1);
m_view->sortByColumn(0, Qt::AscendingOrder); m_view->sortByColumn(0, Qt::AscendingOrder);
const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Create"));
connect(filterEdit, &FancyLineEdit::textChanged, this, [proxyModel](const QString &text) { connect(filterEdit, &FancyLineEdit::textChanged, this, [proxyModel](const QString &text) {
proxyModel->setFilterRegularExpression(QRegularExpression(text, QRegularExpression::CaseInsensitiveOption)); proxyModel->setFilterRegularExpression(QRegularExpression(text, QRegularExpression::CaseInsensitiveOption));

View File

@@ -2,21 +2,23 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "allprojectsfilter.h" #include "allprojectsfilter.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include "project.h" #include "project.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
using namespace Core; using namespace Core;
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal; namespace ProjectExplorer::Internal {
AllProjectsFilter::AllProjectsFilter() AllProjectsFilter::AllProjectsFilter()
{ {
setId("Files in any project"); setId("Files in any project");
setDisplayName(tr("Files in Any Project")); setDisplayName(Tr::tr("Files in Any Project"));
setDescription(tr("Matches all files of all open projects. Append \"+<number>\" or " setDescription(Tr::tr("Matches all files of all open projects. Append \"+<number>\" or "
"\":<number>\" to jump to the given line number. Append another " "\":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well.")); "\"+<number>\" or \":<number>\" to jump to the column number as well."));
setDefaultShortcutString("a"); setDefaultShortcutString("a");
@@ -49,3 +51,5 @@ void AllProjectsFilter::refresh(QFutureInterface<void> &future)
Q_UNUSED(future) Q_UNUSED(future)
QMetaObject::invokeMethod(this, &AllProjectsFilter::markFilesAsOutOfDate, Qt::QueuedConnection); QMetaObject::invokeMethod(this, &AllProjectsFilter::markFilesAsOutOfDate, Qt::QueuedConnection);
} }
} // ProjectExplorer::Internal

View File

@@ -3,14 +3,17 @@
#include "allprojectsfind.h" #include "allprojectsfind.h"
#include "project.h"
#include "session.h"
#include "projectexplorer.h"
#include "editorconfiguration.h" #include "editorconfiguration.h"
#include "project.h"
#include "projectexplorer.h"
#include "projectexplorertr.h"
#include "session.h"
#include <coreplugin/editormanager/editormanager.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/filesearch.h> #include <utils/filesearch.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -36,7 +39,7 @@ QString AllProjectsFind::id() const
QString AllProjectsFind::displayName() const QString AllProjectsFind::displayName() const
{ {
return tr("All Projects"); return Tr::tr("All Projects");
} }
bool AllProjectsFind::isEnabled() const bool AllProjectsFind::isEnabled() const
@@ -84,13 +87,13 @@ QVariant AllProjectsFind::additionalParameters() const
QString AllProjectsFind::label() const QString AllProjectsFind::label() const
{ {
return tr("All Projects:"); return Tr::tr("All Projects:");
} }
QString AllProjectsFind::toolTip() const QString AllProjectsFind::toolTip() const
{ {
// last arg is filled by BaseFileFind::runNewSearch // last arg is filled by BaseFileFind::runNewSearch
return tr("Filter: %1\nExcluding: %2\n%3") return Tr::tr("Filter: %1\nExcluding: %2\n%3")
.arg(fileNameFilters().join(',')) .arg(fileNameFilters().join(','))
.arg(fileExclusionFilters().join(',')); .arg(fileExclusionFilters().join(','));
} }

View File

@@ -6,6 +6,7 @@
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorericons.h" #include "projectexplorericons.h"
#include "projectexplorertr.h"
#include "runcontrol.h" #include "runcontrol.h"
#include "session.h" #include "session.h"
#include "showoutputtaskhandler.h" #include "showoutputtaskhandler.h"
@@ -68,8 +69,8 @@ static QObject *debuggerPlugin()
static QString msgAttachDebuggerTooltip(const QString &handleDescription = QString()) static QString msgAttachDebuggerTooltip(const QString &handleDescription = QString())
{ {
return handleDescription.isEmpty() ? return handleDescription.isEmpty() ?
AppOutputPane::tr("Attach debugger to this process") : Tr::tr("Attach debugger to this process") :
AppOutputPane::tr("Attach debugger to %1").arg(handleDescription); Tr::tr("Attach debugger to %1").arg(handleDescription);
} }
class TabWidget : public QTabWidget class TabWidget : public QTabWidget
@@ -136,19 +137,19 @@ AppOutputPane::RunControlTab::RunControlTab(RunControl *runControl, Core::Output
AppOutputPane::AppOutputPane() : AppOutputPane::AppOutputPane() :
m_tabWidget(new TabWidget), m_tabWidget(new TabWidget),
m_stopAction(new QAction(tr("Stop"), this)), m_stopAction(new QAction(Tr::tr("Stop"), this)),
m_closeCurrentTabAction(new QAction(tr("Close Tab"), this)), m_closeCurrentTabAction(new QAction(Tr::tr("Close Tab"), this)),
m_closeAllTabsAction(new QAction(tr("Close All Tabs"), this)), m_closeAllTabsAction(new QAction(Tr::tr("Close All Tabs"), this)),
m_closeOtherTabsAction(new QAction(tr("Close Other Tabs"), this)), m_closeOtherTabsAction(new QAction(Tr::tr("Close Other Tabs"), this)),
m_reRunButton(new QToolButton), m_reRunButton(new QToolButton),
m_stopButton(new QToolButton), m_stopButton(new QToolButton),
m_attachButton(new QToolButton), m_attachButton(new QToolButton),
m_settingsButton(new QToolButton), m_settingsButton(new QToolButton),
m_formatterWidget(new QWidget), m_formatterWidget(new QWidget),
m_handler(new ShowOutputTaskHandler(this, m_handler(new ShowOutputTaskHandler(this,
tr("Show &App Output"), Tr::tr("Show &App Output"),
tr("Show the output that generated this issue in Application Output."), Tr::tr("Show the output that generated this issue in Application Output."),
tr("A"))) Tr::tr("A")))
{ {
ExtensionSystem::PluginManager::addObject(m_handler); ExtensionSystem::PluginManager::addObject(m_handler);
@@ -157,14 +158,14 @@ AppOutputPane::AppOutputPane() :
// Rerun // Rerun
m_reRunButton->setIcon(Utils::Icons::RUN_SMALL_TOOLBAR.icon()); m_reRunButton->setIcon(Utils::Icons::RUN_SMALL_TOOLBAR.icon());
m_reRunButton->setToolTip(tr("Re-run this run-configuration.")); m_reRunButton->setToolTip(Tr::tr("Re-run this run-configuration."));
m_reRunButton->setEnabled(false); m_reRunButton->setEnabled(false);
connect(m_reRunButton, &QToolButton::clicked, connect(m_reRunButton, &QToolButton::clicked,
this, &AppOutputPane::reRunRunControl); this, &AppOutputPane::reRunRunControl);
// Stop // Stop
m_stopAction->setIcon(Utils::Icons::STOP_SMALL_TOOLBAR.icon()); m_stopAction->setIcon(Utils::Icons::STOP_SMALL_TOOLBAR.icon());
m_stopAction->setToolTip(tr("Stop running program.")); m_stopAction->setToolTip(Tr::tr("Stop running program."));
m_stopAction->setEnabled(false); m_stopAction->setEnabled(false);
Core::Command *cmd = Core::ActionManager::registerAction(m_stopAction, Constants::STOP); Core::Command *cmd = Core::ActionManager::registerAction(m_stopAction, Constants::STOP);
@@ -187,7 +188,7 @@ AppOutputPane::AppOutputPane() :
connect(this, &IOutputPane::zoomOutRequested, this, &AppOutputPane::zoomOut); connect(this, &IOutputPane::zoomOutRequested, this, &AppOutputPane::zoomOut);
connect(this, &IOutputPane::resetZoomRequested, this, &AppOutputPane::resetZoom); connect(this, &IOutputPane::resetZoomRequested, this, &AppOutputPane::resetZoom);
m_settingsButton->setToolTip(tr("Open Settings Page")); m_settingsButton->setToolTip(Tr::tr("Open Settings Page"));
m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon());
connect(m_settingsButton, &QToolButton::clicked, this, [] { connect(m_settingsButton, &QToolButton::clicked, this, [] {
Core::ICore::showOptionsDialog(OPTIONS_PAGE_ID); Core::ICore::showOptionsDialog(OPTIONS_PAGE_ID);
@@ -305,7 +306,7 @@ QList<QWidget*> AppOutputPane::toolBarWidgets() const
QString AppOutputPane::displayName() const QString AppOutputPane::displayName() const
{ {
return tr("Application Output"); return Tr::tr("Application Output");
} }
int AppOutputPane::priorityInStatusBar() const int AppOutputPane::priorityInStatusBar() const
@@ -427,7 +428,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
Id contextId = Id(C_APP_OUTPUT).withSuffix(counter++); Id contextId = Id(C_APP_OUTPUT).withSuffix(counter++);
Core::Context context(contextId); Core::Context context(contextId);
Core::OutputWindow *ow = new Core::OutputWindow(context, SETTINGS_KEY, m_tabWidget); Core::OutputWindow *ow = new Core::OutputWindow(context, SETTINGS_KEY, m_tabWidget);
ow->setWindowTitle(tr("Application Output Window")); ow->setWindowTitle(Tr::tr("Application Output Window"));
ow->setWindowIcon(Icons::WINDOW.icon()); ow->setWindowIcon(Icons::WINDOW.icon());
ow->setWordWrapEnabled(m_settings.wrapOutput); ow->setWordWrapEnabled(m_settings.wrapOutput);
ow->setMaxCharCount(m_settings.maxCharCount); ow->setMaxCharCount(m_settings.maxCharCount);
@@ -698,8 +699,8 @@ void AppOutputPane::enableButtons(const RunControl *rc)
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) { if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
m_attachButton->setEnabled(true); m_attachButton->setEnabled(true);
ProcessHandle h = rc->applicationProcessHandle(); ProcessHandle h = rc->applicationProcessHandle();
QString tip = h.isValid() ? RunControl::tr("PID %1").arg(h.pid()) QString tip = h.isValid() ? Tr::tr("PID %1").arg(h.pid())
: RunControl::tr("Invalid"); : Tr::tr("Invalid");
m_attachButton->setToolTip(msgAttachDebuggerTooltip(tip)); m_attachButton->setToolTip(msgAttachDebuggerTooltip(tip));
} else { } else {
m_attachButton->setEnabled(false); m_attachButton->setEnabled(false);
@@ -804,22 +805,21 @@ bool AppOutputPane::canNavigate() const
class AppOutputSettingsWidget : public Core::IOptionsPageWidget class AppOutputSettingsWidget : public Core::IOptionsPageWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::AppOutputSettingsPage)
public: public:
AppOutputSettingsWidget() AppOutputSettingsWidget()
{ {
const AppOutputSettings &settings = ProjectExplorerPlugin::appOutputSettings(); const AppOutputSettings &settings = ProjectExplorerPlugin::appOutputSettings();
m_wrapOutputCheckBox.setText(tr("Word-wrap output")); m_wrapOutputCheckBox.setText(Tr::tr("Word-wrap output"));
m_wrapOutputCheckBox.setChecked(settings.wrapOutput); m_wrapOutputCheckBox.setChecked(settings.wrapOutput);
m_cleanOldOutputCheckBox.setText(tr("Clear old output on a new run")); m_cleanOldOutputCheckBox.setText(Tr::tr("Clear old output on a new run"));
m_cleanOldOutputCheckBox.setChecked(settings.cleanOldOutput); m_cleanOldOutputCheckBox.setChecked(settings.cleanOldOutput);
m_mergeChannelsCheckBox.setText(tr("Merge stderr and stdout")); m_mergeChannelsCheckBox.setText(Tr::tr("Merge stderr and stdout"));
m_mergeChannelsCheckBox.setChecked(settings.mergeChannels); m_mergeChannelsCheckBox.setChecked(settings.mergeChannels);
for (QComboBox * const modeComboBox for (QComboBox * const modeComboBox
: {&m_runOutputModeComboBox, &m_debugOutputModeComboBox}) { : {&m_runOutputModeComboBox, &m_debugOutputModeComboBox}) {
modeComboBox->addItem(tr("Always"), int(AppOutputPaneMode::PopupOnOutput)); modeComboBox->addItem(Tr::tr("Always"), int(AppOutputPaneMode::PopupOnOutput));
modeComboBox->addItem(tr("Never"), int(AppOutputPaneMode::FlashOnOutput)); modeComboBox->addItem(Tr::tr("Never"), int(AppOutputPaneMode::FlashOnOutput));
modeComboBox->addItem(tr("On First Output Only"), modeComboBox->addItem(Tr::tr("On First Output Only"),
int(AppOutputPaneMode::PopupOnFirstOutput)); int(AppOutputPaneMode::PopupOnFirstOutput));
} }
m_runOutputModeComboBox.setCurrentIndex(m_runOutputModeComboBox m_runOutputModeComboBox.setCurrentIndex(m_runOutputModeComboBox
@@ -833,15 +833,15 @@ public:
layout->addWidget(&m_cleanOldOutputCheckBox); layout->addWidget(&m_cleanOldOutputCheckBox);
layout->addWidget(&m_mergeChannelsCheckBox); layout->addWidget(&m_mergeChannelsCheckBox);
const auto maxCharsLayout = new QHBoxLayout; const auto maxCharsLayout = new QHBoxLayout;
const QString msg = tr("Limit output to %1 characters"); const QString msg = Tr::tr("Limit output to %1 characters");
const QStringList parts = msg.split("%1") << QString() << QString(); const QStringList parts = msg.split("%1") << QString() << QString();
maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed())); maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed()));
maxCharsLayout->addWidget(&m_maxCharsBox); maxCharsLayout->addWidget(&m_maxCharsBox);
maxCharsLayout->addWidget(new QLabel(parts.at(1).trimmed())); maxCharsLayout->addWidget(new QLabel(parts.at(1).trimmed()));
maxCharsLayout->addStretch(1); maxCharsLayout->addStretch(1);
const auto outputModeLayout = new QFormLayout; const auto outputModeLayout = new QFormLayout;
outputModeLayout->addRow(tr("Open Application Output when running:"), &m_runOutputModeComboBox); outputModeLayout->addRow(Tr::tr("Open Application Output when running:"), &m_runOutputModeComboBox);
outputModeLayout->addRow(tr("Open Application Output when debugging:"), outputModeLayout->addRow(Tr::tr("Open Application Output when debugging:"),
&m_debugOutputModeComboBox); &m_debugOutputModeComboBox);
layout->addLayout(outputModeLayout); layout->addLayout(outputModeLayout);
layout->addLayout(maxCharsLayout); layout->addLayout(maxCharsLayout);
@@ -875,7 +875,7 @@ private:
AppOutputSettingsPage::AppOutputSettingsPage() AppOutputSettingsPage::AppOutputSettingsPage()
{ {
setId(OPTIONS_PAGE_ID); setId(OPTIONS_PAGE_ID);
setDisplayName(AppOutputSettingsWidget::tr("Application Output")); setDisplayName(Tr::tr("Application Output"));
setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setWidgetCreator([] { return new AppOutputSettingsWidget; }); setWidgetCreator([] { return new AppOutputSettingsWidget; });
} }

View File

@@ -3,6 +3,8 @@
#include "baseprojectwizarddialog.h" #include "baseprojectwizarddialog.h"
#include "projectexplorertr.h"
#include <coreplugin/documentmanager.h> #include <coreplugin/documentmanager.h>
#include <utils/projectintropage.h> #include <utils/projectintropage.h>
@@ -141,7 +143,7 @@ QString BaseProjectWizardDialog::uniqueProjectName(const FilePath &path)
//: File path suggestion for a new project. If you choose //: File path suggestion for a new project. If you choose
//: to translate it, make sure it is a valid path name without blanks //: to translate it, make sure it is a valid path name without blanks
//: and using only ascii chars. //: and using only ascii chars.
const QString prefix = tr("untitled"); const QString prefix = Tr::tr("untitled");
for (unsigned i = 0; ; ++i) { for (unsigned i = 0; ; ++i) {
QString name = prefix; QString name = prefix;
if (i) if (i)

View File

@@ -9,6 +9,7 @@
#include "kitinformation.h" #include "kitinformation.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include <coreplugin/fileutils.h> #include <coreplugin/fileutils.h>
@@ -39,7 +40,7 @@ BuildDirectoryAspect::BuildDirectoryAspect(const BuildConfiguration *bc)
: d(new Private(bc->target())) : d(new Private(bc->target()))
{ {
setSettingsKey("ProjectExplorer.BuildConfiguration.BuildDirectory"); setSettingsKey("ProjectExplorer.BuildConfiguration.BuildDirectory");
setLabelText(tr("Build directory:")); setLabelText(Tr::tr("Build directory:"));
setDisplayStyle(PathChooserDisplay); setDisplayStyle(PathChooserDisplay);
setExpectedKind(Utils::PathChooser::Directory); setExpectedKind(Utils::PathChooser::Directory);
setValidationFunction([this](FancyLineEdit *edit, QString *error) { setValidationFunction([this](FancyLineEdit *edit, QString *error) {
@@ -52,7 +53,7 @@ BuildDirectoryAspect::BuildDirectoryAspect(const BuildConfiguration *bc)
if (buildDevice && buildDevice->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE if (buildDevice && buildDevice->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
&& !buildDevice->rootPath().ensureReachable(newPath)) { && !buildDevice->rootPath().ensureReachable(newPath)) {
*error = tr("The build directory is not reachable from the build device."); *error = Tr::tr("The build directory is not reachable from the build device.");
return false; return false;
} }
@@ -71,7 +72,7 @@ BuildDirectoryAspect::~BuildDirectoryAspect()
void BuildDirectoryAspect::allowInSourceBuilds(const FilePath &sourceDir) void BuildDirectoryAspect::allowInSourceBuilds(const FilePath &sourceDir)
{ {
d->sourceDir = sourceDir; d->sourceDir = sourceDir;
makeCheckable(CheckBoxPlacement::Top, tr("Shadow build:"), QString()); makeCheckable(CheckBoxPlacement::Top, Tr::tr("Shadow build:"), QString());
setChecked(d->sourceDir != filePath()); setChecked(d->sourceDir != filePath());
} }
@@ -164,7 +165,7 @@ void BuildDirectoryAspect::updateProblemLabel()
SeparateDebugInfoAspect::SeparateDebugInfoAspect() SeparateDebugInfoAspect::SeparateDebugInfoAspect()
{ {
setDisplayName(tr("Separate debug info:")); setDisplayName(Tr::tr("Separate debug info:"));
setSettingsKey("SeparateDebugInfo"); setSettingsKey("SeparateDebugInfo");
setValue(ProjectExplorerPlugin::buildPropertiesSettings().separateDebugInfo.value()); setValue(ProjectExplorerPlugin::buildPropertiesSettings().separateDebugInfo.value());
} }

View File

@@ -12,15 +12,14 @@
#include "environmentwidget.h" #include "environmentwidget.h"
#include "kit.h" #include "kit.h"
#include "kitinformation.h" #include "kitinformation.h"
#include "kitmanager.h"
#include "namedwidget.h" #include "namedwidget.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorertr.h"
#include "project.h" #include "project.h"
#include "projecttree.h" #include "projecttree.h"
#include "session.h" #include "session.h"
#include "target.h" #include "target.h"
#include "toolchain.h"
#include <coreplugin/fileutils.h> #include <coreplugin/fileutils.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -56,13 +55,12 @@ namespace Internal {
class BuildEnvironmentWidget : public NamedWidget class BuildEnvironmentWidget : public NamedWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::BuildEnvironmentWidget)
public: public:
explicit BuildEnvironmentWidget(BuildConfiguration *bc) explicit BuildEnvironmentWidget(BuildConfiguration *bc)
: NamedWidget(tr("Build Environment")) : NamedWidget(Tr::tr("Build Environment"))
{ {
auto clearBox = new QCheckBox(tr("Clear system environment"), this); auto clearBox = new QCheckBox(Tr::tr("Clear system environment"), this);
clearBox->setChecked(!bc->useSystemEnvironment()); clearBox->setChecked(!bc->useSystemEnvironment());
auto envWidget = new EnvironmentWidget(this, EnvironmentWidget::TypeLocal, clearBox); auto envWidget = new EnvironmentWidget(this, EnvironmentWidget::TypeLocal, clearBox);
@@ -100,15 +98,14 @@ public:
class CustomParsersBuildWidget : public NamedWidget class CustomParsersBuildWidget : public NamedWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::CustomParsersBuildWidget)
public: public:
CustomParsersBuildWidget(BuildConfiguration *bc) : NamedWidget(tr("Custom Output Parsers")) CustomParsersBuildWidget(BuildConfiguration *bc) : NamedWidget(Tr::tr("Custom Output Parsers"))
{ {
const auto layout = new QVBoxLayout(this); const auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0); layout->setContentsMargins(0, 0, 0, 0);
const auto pasteStdOutCB = new QCheckBox(tr("Parse standard output during build"), this); const auto pasteStdOutCB = new QCheckBox(Tr::tr("Parse standard output during build"), this);
pasteStdOutCB->setToolTip(tr("Makes output parsers look for diagnostics " pasteStdOutCB->setToolTip(Tr::tr("Makes output parsers look for diagnostics "
"on stdout rather than stderr.")); "on stdout rather than stderr."));
pasteStdOutCB->setChecked(bc->parseStdOut()); pasteStdOutCB->setChecked(bc->parseStdOut());
layout->addWidget(pasteStdOutCB); layout->addWidget(pasteStdOutCB);
@@ -163,18 +160,18 @@ BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
QTC_CHECK(target && target == this->target()); QTC_CHECK(target && target == this->target());
MacroExpander *expander = macroExpander(); MacroExpander *expander = macroExpander();
expander->setDisplayName(tr("Build Settings")); expander->setDisplayName(Tr::tr("Build Settings"));
expander->setAccumulating(true); expander->setAccumulating(true);
expander->registerSubProvider([target] { return target->macroExpander(); }); expander->registerSubProvider([target] { return target->macroExpander(); });
expander->registerVariable("buildDir", tr("Build directory"), expander->registerVariable("buildDir", Tr::tr("Build directory"),
[this] { return buildDirectory().toUserOutput(); }); [this] { return buildDirectory().toUserOutput(); });
expander->registerVariable("BuildConfig:Name", tr("Name of the build configuration"), expander->registerVariable("BuildConfig:Name", Tr::tr("Name of the build configuration"),
[this] { return displayName(); }); [this] { return displayName(); });
expander->registerPrefix("BuildConfig:Env", expander->registerPrefix("BuildConfig:Env",
tr("Variables in the build configuration's environment"), Tr::tr("Variables in the build configuration's environment"),
[this](const QString &var) { return environment().expandedValueForKey(var); }); [this](const QString &var) { return environment().expandedValueForKey(var); });
connect(Core::ICore::instance(), &Core::ICore::systemEnvironmentChanged, connect(Core::ICore::instance(), &Core::ICore::systemEnvironmentChanged,
@@ -201,8 +198,8 @@ BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
}); });
d->m_tooltipAspect = addAspect<StringAspect>(); d->m_tooltipAspect = addAspect<StringAspect>();
d->m_tooltipAspect->setLabelText(tr("Tooltip in target selector:")); d->m_tooltipAspect->setLabelText(Tr::tr("Tooltip in target selector:"));
d->m_tooltipAspect->setToolTip(tr("Appears as a tooltip when hovering the build configuration")); d->m_tooltipAspect->setToolTip(Tr::tr("Appears as a tooltip when hovering the build configuration"));
d->m_tooltipAspect->setDisplayStyle(StringAspect::LineEditDisplay); d->m_tooltipAspect->setDisplayStyle(StringAspect::LineEditDisplay);
d->m_tooltipAspect->setSettingsKey("ProjectExplorer.BuildConfiguration.Tooltip"); d->m_tooltipAspect->setSettingsKey("ProjectExplorer.BuildConfiguration.Tooltip");
connect(d->m_tooltipAspect, &StringAspect::changed, this, [this] { connect(d->m_tooltipAspect, &StringAspect::changed, this, [this] {
@@ -481,9 +478,9 @@ Environment BuildConfiguration::baseEnvironment() const
QString BuildConfiguration::baseEnvironmentText() const QString BuildConfiguration::baseEnvironmentText() const
{ {
if (useSystemEnvironment()) if (useSystemEnvironment())
return tr("System Environment"); return Tr::tr("System Environment");
else else
return tr("Clean Environment"); return Tr::tr("Clean Environment");
} }
Environment BuildConfiguration::environment() const Environment BuildConfiguration::environment() const
@@ -543,7 +540,7 @@ bool BuildConfiguration::isEnabled() const
QString BuildConfiguration::disabledReason() const QString BuildConfiguration::disabledReason() const
{ {
if (!buildSystem()->hasParsingData()) if (!buildSystem()->hasParsingData())
return (tr("The project was not parsed successfully.")); return (Tr::tr("The project was not parsed successfully."));
return QString(); return QString();
} }
@@ -596,25 +593,22 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
qCDebug(bcLog) << Q_FUNC_INFO << projectDir << mainFilePath << projectName << bcName; qCDebug(bcLog) << Q_FUNC_INFO << projectDir << mainFilePath << projectName << bcName;
exp.registerFileVariables("Project", exp.registerFileVariables("Project",
QCoreApplication::translate("::ProjectExplorer", "Main file of the project"), Tr::tr("Main file of the project"),
[mainFilePath] { return mainFilePath; }); [mainFilePath] { return mainFilePath; });
exp.registerVariable("Project:Name", exp.registerVariable("Project:Name",
QCoreApplication::translate("::ProjectExplorer", "Name of the project"), Tr::tr("Name of the project"),
[projectName] { return projectName; }); [projectName] { return projectName; });
exp.registerVariable("BuildConfig:Name", exp.registerVariable("BuildConfig:Name",
QCoreApplication::translate( Tr::tr("Name of the project's active build configuration"),
"::ProjectExplorer", "Name of the project's active build configuration"),
[bcName] { return bcName; }); [bcName] { return bcName; });
exp.registerVariable("BuildSystem:Name", exp.registerVariable("BuildSystem:Name",
QCoreApplication::translate( Tr::tr("Name of the project's active build system"),
"::ProjectExplorer", "Name of the project's active build system"),
[buildSystem] { return buildSystem; }); [buildSystem] { return buildSystem; });
exp.registerVariable("CurrentBuild:Type", exp.registerVariable("CurrentBuild:Type",
QCoreApplication::translate("::ProjectExplorer", "Type of current build"), Tr::tr("Type of current build"),
[buildType] { return buildTypeName(buildType); }, false); [buildType] { return buildTypeName(buildType); }, false);
exp.registerVariable("BuildConfig:Type", exp.registerVariable("BuildConfig:Type",
QCoreApplication::translate( Tr::tr("Type of the project's active build configuration"),
"::ProjectExplorer", "Type of the project's active build configuration"),
[buildType] { return buildTypeName(buildType); }); [buildType] { return buildTypeName(buildType); });
exp.registerSubProvider([kit] { return kit->macroExpander(); }); exp.registerSubProvider([kit] { return kit->macroExpander(); });

View File

@@ -288,16 +288,16 @@ BuildManager *BuildManager::instance()
void BuildManager::extensionsInitialized() void BuildManager::extensionsInitialized()
{ {
TaskHub::addCategory(Constants::TASK_CATEGORY_COMPILE, TaskHub::addCategory(Constants::TASK_CATEGORY_COMPILE,
tr("Compile", "Category for compiler issues listed under 'Issues'"), Tr::tr("Compile", "Category for compiler issues listed under 'Issues'"),
true, 100); true, 100);
TaskHub::addCategory(Constants::TASK_CATEGORY_BUILDSYSTEM, TaskHub::addCategory(Constants::TASK_CATEGORY_BUILDSYSTEM,
tr("Build System", "Category for build system issues listed under 'Issues'"), Tr::tr("Build System", "Category for build system issues listed under 'Issues'"),
true, 100); true, 100);
TaskHub::addCategory(Constants::TASK_CATEGORY_DEPLOYMENT, TaskHub::addCategory(Constants::TASK_CATEGORY_DEPLOYMENT,
tr("Deployment", "Category for deployment issues listed under 'Issues'"), Tr::tr("Deployment", "Category for deployment issues listed under 'Issues'"),
true, 100); true, 100);
TaskHub::addCategory(Constants::TASK_CATEGORY_AUTOTEST, TaskHub::addCategory(Constants::TASK_CATEGORY_AUTOTEST,
tr("Autotests", "Category for autotest issues listed under 'Issues'"), Tr::tr("Autotests", "Category for autotest issues listed under 'Issues'"),
true, 100); true, 100);
} }
@@ -457,14 +457,14 @@ QString BuildManager::displayNameForStepId(Id stepId)
{ {
if (stepId == Constants::BUILDSTEPS_CLEAN) { if (stepId == Constants::BUILDSTEPS_CLEAN) {
//: Displayed name for a "cleaning" build step //: Displayed name for a "cleaning" build step
return tr("Clean"); return Tr::tr("Clean");
} }
if (stepId == Constants::BUILDSTEPS_DEPLOY) { if (stepId == Constants::BUILDSTEPS_DEPLOY) {
//: Displayed name for a deploy step //: Displayed name for a deploy step
return tr("Deploy"); return Tr::tr("Deploy");
} }
//: Displayed name for a normal build step //: Displayed name for a normal build step
return tr("Build"); return Tr::tr("Build");
} }
void BuildManager::cancel() void BuildManager::cancel()
@@ -504,7 +504,7 @@ void BuildManager::finish()
void BuildManager::emitCancelMessage() void BuildManager::emitCancelMessage()
{ {
addToOutputWindow(tr("Canceled build/deployment."), BuildStep::OutputFormat::ErrorMessage); addToOutputWindow(Tr::tr("Canceled build/deployment."), BuildStep::OutputFormat::ErrorMessage);
} }
void BuildManager::clearBuildQueue() void BuildManager::clearBuildQueue()
@@ -659,7 +659,7 @@ void BuildManager::nextBuildQueue()
//TODO NBS fix in qtconcurrent //TODO NBS fix in qtconcurrent
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100,
tr("Build/Deployment canceled")); Tr::tr("Build/Deployment canceled"));
clearBuildQueue(); clearBuildQueue();
return; return;
} }
@@ -679,13 +679,13 @@ void BuildManager::nextBuildQueue()
Target *t = d->m_currentBuildStep->target(); Target *t = d->m_currentBuildStep->target();
const QString projectName = d->m_currentBuildStep->project()->displayName(); const QString projectName = d->m_currentBuildStep->project()->displayName();
const QString targetName = t->displayName(); const QString targetName = t->displayName();
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr); addToOutputWindow(Tr::tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
const Tasks kitTasks = t->kit()->validate(); const Tasks kitTasks = t->kit()->validate();
if (!kitTasks.isEmpty()) { if (!kitTasks.isEmpty()) {
addToOutputWindow(tr("The kit %1 has configuration issues which might be the root cause for this problem.") addToOutputWindow(Tr::tr("The kit %1 has configuration issues which might be the root cause for this problem.")
.arg(targetName), BuildStep::OutputFormat::Stderr); .arg(targetName), BuildStep::OutputFormat::Stderr);
} }
addToOutputWindow(tr("When executing step \"%1\"").arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::Stderr); addToOutputWindow(Tr::tr("When executing step \"%1\"").arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::Stderr);
bool abort = ProjectExplorerPlugin::projectExplorerSettings().abortBuildAllOnError; bool abort = ProjectExplorerPlugin::projectExplorerSettings().abortBuildAllOnError;
if (!abort) { if (!abort) {
@@ -702,7 +702,7 @@ void BuildManager::nextBuildQueue()
if (abort) { if (abort) {
// NBS TODO fix in qtconcurrent // NBS TODO fix in qtconcurrent
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress * 100, d->m_progressFutureInterface->setProgressValueAndText(d->m_progress * 100,
tr("Error while building/deploying project %1 (kit: %2)") Tr::tr("Error while building/deploying project %1 (kit: %2)")
.arg(projectName, targetName)); .arg(projectName, targetName));
clearBuildQueue(); clearBuildQueue();
} else { } else {
@@ -729,13 +729,13 @@ void BuildManager::nextStep()
if (d->m_currentBuildStep->project() != d->m_previousBuildStepProject) { if (d->m_currentBuildStep->project() != d->m_previousBuildStepProject) {
const QString projectName = d->m_currentBuildStep->project()->displayName(); const QString projectName = d->m_currentBuildStep->project()->displayName();
addToOutputWindow(tr("Running steps for project %1...") addToOutputWindow(Tr::tr("Running steps for project %1...")
.arg(projectName), BuildStep::OutputFormat::NormalMessage); .arg(projectName), BuildStep::OutputFormat::NormalMessage);
d->m_previousBuildStepProject = d->m_currentBuildStep->project(); d->m_previousBuildStepProject = d->m_currentBuildStep->project();
} }
if (d->m_skipDisabled) { if (d->m_skipDisabled) {
addToOutputWindow(tr("Skipping disabled step %1.") addToOutputWindow(Tr::tr("Skipping disabled step %1.")
.arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::NormalMessage); .arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::NormalMessage);
nextBuildQueue(); nextBuildQueue();
return; return;
@@ -803,8 +803,8 @@ bool BuildManager::buildQueueAppend(const QList<BuildStep *> &steps, QStringList
// print something for the user // print something for the user
const QString projectName = bs->project()->displayName(); const QString projectName = bs->project()->displayName();
const QString targetName = bs->target()->displayName(); const QString targetName = bs->target()->displayName();
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr); addToOutputWindow(Tr::tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
addToOutputWindow(tr("When executing step \"%1\"").arg(bs->displayName()), BuildStep::OutputFormat::Stderr); addToOutputWindow(Tr::tr("When executing step \"%1\"").arg(bs->displayName()), BuildStep::OutputFormat::Stderr);
// disconnect the buildsteps again // disconnect the buildsteps again
for (int j = 0; j <= i; ++j) for (int j = 0; j <= i; ++j)

View File

@@ -4,6 +4,7 @@
#include "buildpropertiessettings.h" #include "buildpropertiessettings.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
@@ -16,10 +17,7 @@ const char DEFAULT_BUILD_DIRECTORY_TEMPLATE[]
= "../%{JS: Util.asciify(\"build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}\")}"; = "../%{JS: Util.asciify(\"build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}\")}";
BuildPropertiesSettings::BuildTriStateAspect::BuildTriStateAspect() BuildPropertiesSettings::BuildTriStateAspect::BuildTriStateAspect()
: TriStateAspect{ : TriStateAspect{Tr::tr("Enable"), Tr::tr("Disable"), Tr::tr("Use Project Default")}
BuildPropertiesSettings::tr("Enable"),
BuildPropertiesSettings::tr("Disable"),
BuildPropertiesSettings::tr("Use Project Default")}
{} {}
BuildPropertiesSettings::BuildPropertiesSettings() BuildPropertiesSettings::BuildPropertiesSettings()
@@ -30,7 +28,7 @@ BuildPropertiesSettings::BuildPropertiesSettings()
buildDirectoryTemplate.setDisplayStyle(StringAspect::LineEditDisplay); buildDirectoryTemplate.setDisplayStyle(StringAspect::LineEditDisplay);
buildDirectoryTemplate.setSettingsKey("Directories/BuildDirectory.TemplateV2"); buildDirectoryTemplate.setSettingsKey("Directories/BuildDirectory.TemplateV2");
buildDirectoryTemplate.setDefaultValue(DEFAULT_BUILD_DIRECTORY_TEMPLATE); buildDirectoryTemplate.setDefaultValue(DEFAULT_BUILD_DIRECTORY_TEMPLATE);
buildDirectoryTemplate.setLabelText(tr("Default build directory:")); buildDirectoryTemplate.setLabelText(Tr::tr("Default build directory:"));
buildDirectoryTemplate.setUseGlobalMacroExpander(); buildDirectoryTemplate.setUseGlobalMacroExpander();
buildDirectoryTemplate.setUseResetButton(); buildDirectoryTemplate.setUseResetButton();
@@ -40,15 +38,15 @@ BuildPropertiesSettings::BuildPropertiesSettings()
registerAspect(&separateDebugInfo); registerAspect(&separateDebugInfo);
separateDebugInfo.setSettingsKey("ProjectExplorer/Settings/SeparateDebugInfo"); separateDebugInfo.setSettingsKey("ProjectExplorer/Settings/SeparateDebugInfo");
separateDebugInfo.setLabelText(tr("Separate debug info:")); separateDebugInfo.setLabelText(Tr::tr("Separate debug info:"));
registerAspect(&qmlDebugging); registerAspect(&qmlDebugging);
qmlDebugging.setSettingsKey("ProjectExplorer/Settings/QmlDebugging"); qmlDebugging.setSettingsKey("ProjectExplorer/Settings/QmlDebugging");
qmlDebugging.setLabelText(tr("QML debugging:")); qmlDebugging.setLabelText(Tr::tr("QML debugging:"));
registerAspect(&qtQuickCompiler); registerAspect(&qtQuickCompiler);
qtQuickCompiler.setSettingsKey("ProjectExplorer/Settings/QtQuickCompiler"); qtQuickCompiler.setSettingsKey("ProjectExplorer/Settings/QtQuickCompiler");
qtQuickCompiler.setLabelText(tr("Use qmlcachegen:")); qtQuickCompiler.setLabelText(Tr::tr("Use qmlcachegen:"));
QObject::connect(&showQtSettings, &BoolAspect::valueChanged, QObject::connect(&showQtSettings, &BoolAspect::valueChanged,
&qmlDebugging, &BaseAspect::setVisible); &qmlDebugging, &BaseAspect::setVisible);
@@ -82,7 +80,7 @@ namespace Internal {
BuildPropertiesSettingsPage::BuildPropertiesSettingsPage(BuildPropertiesSettings *settings) BuildPropertiesSettingsPage::BuildPropertiesSettingsPage(BuildPropertiesSettings *settings)
{ {
setId("AB.ProjectExplorer.BuildPropertiesSettingsPage"); setId("AB.ProjectExplorer.BuildPropertiesSettingsPage");
setDisplayName(BuildPropertiesSettings::tr("Default Build Properties")); setDisplayName(Tr::tr("Default Build Properties"));
setCategory(ProjectExplorer::Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); setCategory(ProjectExplorer::Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setSettings(settings); setSettings(settings);

View File

@@ -13,8 +13,6 @@ namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT BuildPropertiesSettings : public Utils::AspectContainer class PROJECTEXPLORER_EXPORT BuildPropertiesSettings : public Utils::AspectContainer
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::BuildPropertiesSettings)
public: public:
BuildPropertiesSettings(); BuildPropertiesSettings();

View File

@@ -2,20 +2,22 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "buildsettingspropertiespage.h" #include "buildsettingspropertiespage.h"
#include "buildinfo.h"
#include "buildstepspage.h"
#include "target.h"
#include "project.h"
#include "buildconfiguration.h" #include "buildconfiguration.h"
#include "buildinfo.h"
#include "buildmanager.h"
#include "namedwidget.h"
#include "project.h"
#include "projectconfigurationmodel.h" #include "projectconfigurationmodel.h"
#include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include "target.h"
#include <coreplugin/icore.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/buildmanager.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <QMargins> #include <QMargins>
@@ -51,7 +53,7 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) :
if (!BuildConfigurationFactory::find(m_target)) { if (!BuildConfigurationFactory::find(m_target)) {
auto noSettingsLabel = new QLabel(this); auto noSettingsLabel = new QLabel(this);
noSettingsLabel->setText(tr("No build settings available")); noSettingsLabel->setText(Tr::tr("No build settings available"));
QFont f = noSettingsLabel->font(); QFont f = noSettingsLabel->font();
f.setPointSizeF(f.pointSizeF() * 1.2); f.setPointSizeF(f.pointSizeF() * 1.2);
noSettingsLabel->setFont(f); noSettingsLabel->setFont(f);
@@ -62,31 +64,31 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) :
{ // Edit Build Configuration row { // Edit Build Configuration row
auto hbox = new QHBoxLayout(); auto hbox = new QHBoxLayout();
hbox->setContentsMargins(0, 0, 0, 0); hbox->setContentsMargins(0, 0, 0, 0);
hbox->addWidget(new QLabel(tr("Edit build configuration:"), this)); hbox->addWidget(new QLabel(Tr::tr("Edit build configuration:"), this));
m_buildConfigurationComboBox = new QComboBox(this); m_buildConfigurationComboBox = new QComboBox(this);
m_buildConfigurationComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); m_buildConfigurationComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
m_buildConfigurationComboBox->setModel(m_target->buildConfigurationModel()); m_buildConfigurationComboBox->setModel(m_target->buildConfigurationModel());
hbox->addWidget(m_buildConfigurationComboBox); hbox->addWidget(m_buildConfigurationComboBox);
m_addButton = new QPushButton(this); m_addButton = new QPushButton(this);
m_addButton->setText(tr("Add")); m_addButton->setText(Tr::tr("Add"));
m_addButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_addButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
hbox->addWidget(m_addButton); hbox->addWidget(m_addButton);
m_addButtonMenu = new QMenu(this); m_addButtonMenu = new QMenu(this);
m_addButton->setMenu(m_addButtonMenu); m_addButton->setMenu(m_addButtonMenu);
m_removeButton = new QPushButton(this); m_removeButton = new QPushButton(this);
m_removeButton->setText(tr("Remove")); m_removeButton->setText(Tr::tr("Remove"));
m_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
hbox->addWidget(m_removeButton); hbox->addWidget(m_removeButton);
m_renameButton = new QPushButton(this); m_renameButton = new QPushButton(this);
m_renameButton->setText(tr("Rename...")); m_renameButton->setText(Tr::tr("Rename..."));
m_renameButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_renameButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
hbox->addWidget(m_renameButton); hbox->addWidget(m_renameButton);
m_cloneButton = new QPushButton(this); m_cloneButton = new QPushButton(this);
m_cloneButton->setText(tr("Clone...")); m_cloneButton->setText(Tr::tr("Clone..."));
m_cloneButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_cloneButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
hbox->addWidget(m_cloneButton); hbox->addWidget(m_cloneButton);
@@ -205,8 +207,8 @@ void BuildSettingsWidget::createConfiguration(const BuildInfo &info_)
if (info.displayName.isEmpty()) { if (info.displayName.isEmpty()) {
bool ok = false; bool ok = false;
info.displayName = QInputDialog::getText(Core::ICore::dialogParent(), info.displayName = QInputDialog::getText(Core::ICore::dialogParent(),
tr("New Configuration"), Tr::tr("New Configuration"),
tr("New configuration name:"), Tr::tr("New configuration name:"),
QLineEdit::Normal, QLineEdit::Normal,
QString(), QString(),
&ok) &ok)
@@ -242,8 +244,8 @@ void BuildSettingsWidget::renameConfiguration()
{ {
QTC_ASSERT(m_buildConfiguration, return); QTC_ASSERT(m_buildConfiguration, return);
bool ok; bool ok;
QString name = QInputDialog::getText(this, tr("Rename..."), QString name = QInputDialog::getText(this, Tr::tr("Rename..."),
tr("New name for build configuration <b>%1</b>:"). Tr::tr("New name for build configuration <b>%1</b>:").
arg(m_buildConfiguration->displayName()), arg(m_buildConfiguration->displayName()),
QLineEdit::Normal, QLineEdit::Normal,
m_buildConfiguration->displayName(), &ok); m_buildConfiguration->displayName(), &ok);
@@ -267,8 +269,8 @@ void BuildSettingsWidget::cloneConfiguration()
//: Title of a the cloned BuildConfiguration window, text of the window //: Title of a the cloned BuildConfiguration window, text of the window
QString name = uniqueName(QInputDialog::getText(this, QString name = uniqueName(QInputDialog::getText(this,
tr("Clone Configuration"), Tr::tr("Clone Configuration"),
tr("New configuration name:"), Tr::tr("New configuration name:"),
QLineEdit::Normal, QLineEdit::Normal,
m_buildConfiguration->displayName())); m_buildConfiguration->displayName()));
if (name.isEmpty()) if (name.isEmpty())
@@ -301,19 +303,19 @@ void BuildSettingsWidget::deleteConfiguration(BuildConfiguration *deleteConfigur
if (BuildManager::isBuilding(deleteConfiguration)) { if (BuildManager::isBuilding(deleteConfiguration)) {
QMessageBox box; QMessageBox box;
QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Remove Build Configuration"), QMessageBox::AcceptRole); QPushButton *closeAnyway = box.addButton(Tr::tr("Cancel Build && Remove Build Configuration"), QMessageBox::AcceptRole);
QPushButton *cancelClose = box.addButton(tr("Do Not Remove"), QMessageBox::RejectRole); QPushButton *cancelClose = box.addButton(Tr::tr("Do Not Remove"), QMessageBox::RejectRole);
box.setDefaultButton(cancelClose); box.setDefaultButton(cancelClose);
box.setWindowTitle(tr("Remove Build Configuration %1?").arg(deleteConfiguration->displayName())); box.setWindowTitle(Tr::tr("Remove Build Configuration %1?").arg(deleteConfiguration->displayName()));
box.setText(tr("The build configuration <b>%1</b> is currently being built.").arg(deleteConfiguration->displayName())); box.setText(Tr::tr("The build configuration <b>%1</b> is currently being built.").arg(deleteConfiguration->displayName()));
box.setInformativeText(tr("Do you want to cancel the build process and remove the Build Configuration anyway?")); box.setInformativeText(Tr::tr("Do you want to cancel the build process and remove the Build Configuration anyway?"));
box.exec(); box.exec();
if (box.clickedButton() != closeAnyway) if (box.clickedButton() != closeAnyway)
return; return;
BuildManager::cancel(); BuildManager::cancel();
} else { } else {
QMessageBox msgBox(QMessageBox::Question, tr("Remove Build Configuration?"), QMessageBox msgBox(QMessageBox::Question, Tr::tr("Remove Build Configuration?"),
tr("Do you really want to delete build configuration <b>%1</b>?").arg(deleteConfiguration->displayName()), Tr::tr("Do you really want to delete build configuration <b>%1</b>?").arg(deleteConfiguration->displayName()),
QMessageBox::Yes|QMessageBox::No, this); QMessageBox::Yes|QMessageBox::No, this);
msgBox.setDefaultButton(QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No);
msgBox.setEscapeButton(QMessageBox::No); msgBox.setEscapeButton(QMessageBox::No);

View File

@@ -6,6 +6,7 @@
#include "buildmanager.h" #include "buildmanager.h"
#include "buildstep.h" #include "buildstep.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -81,15 +82,15 @@ QString BuildStepList::displayName() const
{ {
if (m_id == Constants::BUILDSTEPS_BUILD) { if (m_id == Constants::BUILDSTEPS_BUILD) {
//: Display name of the build build step list. Used as part of the labels in the project window. //: Display name of the build build step list. Used as part of the labels in the project window.
return tr("Build"); return Tr::tr("Build");
} }
if (m_id == Constants::BUILDSTEPS_CLEAN) { if (m_id == Constants::BUILDSTEPS_CLEAN) {
//: Display name of the clean build step list. Used as part of the labels in the project window. //: Display name of the clean build step list. Used as part of the labels in the project window.
return tr("Clean"); return Tr::tr("Clean");
} }
if (m_id == Constants::BUILDSTEPS_DEPLOY) { if (m_id == Constants::BUILDSTEPS_DEPLOY) {
//: Display name of the deploy build step list. Used as part of the labels in the project window. //: Display name of the deploy build step list. Used as part of the labels in the project window.
return tr("Deploy"); return Tr::tr("Deploy");
} }
QTC_CHECK(false); QTC_CHECK(false);
return {}; return {};

View File

@@ -3,10 +3,9 @@
#include "buildstepspage.h" #include "buildstepspage.h"
#include "buildconfiguration.h"
#include "buildsteplist.h" #include "buildsteplist.h"
#include "projectexplorerconstants.h"
#include "projectexplorericons.h" #include "projectexplorericons.h"
#include "projectexplorertr.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -58,21 +57,21 @@ ToolWidget::ToolWidget(QWidget *parent) : FadingPanel(parent)
m_upButton = new QToolButton(m_secondWidget); m_upButton = new QToolButton(m_secondWidget);
m_upButton->setAutoRaise(true); m_upButton->setAutoRaise(true);
m_upButton->setToolTip(BuildStepListWidget::tr("Move Up")); m_upButton->setToolTip(Tr::tr("Move Up"));
m_upButton->setFixedSize(buttonSize); m_upButton->setFixedSize(buttonSize);
m_upButton->setIcon(Icons::BUILDSTEP_MOVEUP.icon()); m_upButton->setIcon(Icons::BUILDSTEP_MOVEUP.icon());
hbox->addWidget(m_upButton); hbox->addWidget(m_upButton);
m_downButton = new QToolButton(m_secondWidget); m_downButton = new QToolButton(m_secondWidget);
m_downButton->setAutoRaise(true); m_downButton->setAutoRaise(true);
m_downButton->setToolTip(BuildStepListWidget::tr("Move Down")); m_downButton->setToolTip(Tr::tr("Move Down"));
m_downButton->setFixedSize(buttonSize); m_downButton->setFixedSize(buttonSize);
m_downButton->setIcon(Icons::BUILDSTEP_MOVEDOWN.icon()); m_downButton->setIcon(Icons::BUILDSTEP_MOVEDOWN.icon());
hbox->addWidget(m_downButton); hbox->addWidget(m_downButton);
m_removeButton = new QToolButton(m_secondWidget); m_removeButton = new QToolButton(m_secondWidget);
m_removeButton->setAutoRaise(true); m_removeButton->setAutoRaise(true);
m_removeButton->setToolTip(BuildStepListWidget::tr("Remove Item")); m_removeButton->setToolTip(Tr::tr("Remove Item"));
m_removeButton->setFixedSize(buttonSize); m_removeButton->setFixedSize(buttonSize);
m_removeButton->setIcon(Icons::BUILDSTEP_REMOVE.icon()); m_removeButton->setIcon(Icons::BUILDSTEP_REMOVE.icon());
hbox->addWidget(m_removeButton); hbox->addWidget(m_removeButton);
@@ -116,8 +115,7 @@ void ToolWidget::setBuildStepEnabled(bool b)
m_firstWidget->fadeTo(.999); m_firstWidget->fadeTo(.999);
} }
m_disableButton->setChecked(!b); m_disableButton->setChecked(!b);
m_disableButton->setToolTip(b ? BuildStepListWidget::tr("Disable") m_disableButton->setToolTip(b ? Tr::tr("Disable") : Tr::tr("Enable"));
: BuildStepListWidget::tr("Enable"));
} }
void ToolWidget::setUpEnabled(bool b) void ToolWidget::setUpEnabled(bool b)
@@ -170,7 +168,7 @@ BuildStepsWidgetData::~BuildStepsWidgetData()
BuildStepListWidget::BuildStepListWidget(BuildStepList *bsl) BuildStepListWidget::BuildStepListWidget(BuildStepList *bsl)
//: %1 is the name returned by BuildStepList::displayName //: %1 is the name returned by BuildStepList::displayName
: NamedWidget(tr("%1 Steps").arg(bsl->displayName())), m_buildStepList(bsl) : NamedWidget(Tr::tr("%1 Steps").arg(bsl->displayName())), m_buildStepList(bsl)
{ {
setupUi(); setupUi();
@@ -189,9 +187,9 @@ BuildStepListWidget::BuildStepListWidget(BuildStepList *bsl)
} }
m_noStepsLabel->setVisible(bsl->isEmpty()); m_noStepsLabel->setVisible(bsl->isEmpty());
m_noStepsLabel->setText(tr("No %1 Steps").arg(m_buildStepList->displayName())); m_noStepsLabel->setText(Tr::tr("No %1 Steps").arg(m_buildStepList->displayName()));
m_addButton->setText(tr("Add %1 Step").arg(m_buildStepList->displayName())); m_addButton->setText(Tr::tr("Add %1 Step").arg(m_buildStepList->displayName()));
updateBuildStepButtonsState(); updateBuildStepButtonsState();
} }
@@ -285,7 +283,7 @@ void BuildStepListWidget::setupUi()
m_vbox = new QVBoxLayout(this); m_vbox = new QVBoxLayout(this);
m_vbox->setContentsMargins(0, 0, 0, 0); m_vbox->setContentsMargins(0, 0, 0, 0);
m_noStepsLabel = new QLabel(tr("No Build Steps"), this); m_noStepsLabel = new QLabel(Tr::tr("No Build Steps"), this);
m_noStepsLabel->setContentsMargins(0, 0, 0, 0); m_noStepsLabel->setContentsMargins(0, 0, 0, 0);
m_vbox->addWidget(m_noStepsLabel); m_vbox->addWidget(m_noStepsLabel);
@@ -324,8 +322,8 @@ void BuildStepListWidget::updateBuildStepButtonsState()
this, [this, i] { this, [this, i] {
if (!m_buildStepList->removeStep(i)) { if (!m_buildStepList->removeStep(i)) {
QMessageBox::warning(Core::ICore::dialogParent(), QMessageBox::warning(Core::ICore::dialogParent(),
tr("Removing Step failed"), Tr::tr("Removing Step failed"),
tr("Cannot remove build step while building"), Tr::tr("Cannot remove build step while building"),
QMessageBox::Ok, QMessageBox::Ok,
QMessageBox::Ok); QMessageBox::Ok);
} }

View File

@@ -5,6 +5,7 @@
#include "buildconfiguration.h" #include "buildconfiguration.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorertr.h"
#include "runconfiguration.h" #include "runconfiguration.h"
#include "runcontrol.h" #include "runcontrol.h"
#include "session.h" #include "session.h"
@@ -377,11 +378,11 @@ void BuildSystem::appendBuildSystemOutput(const QString &message)
QString BuildSystem::disabledReason(const QString &buildKey) const QString BuildSystem::disabledReason(const QString &buildKey) const
{ {
if (!hasParsingData()) { if (!hasParsingData()) {
QString msg = isParsing() ? tr("The project is currently being parsed.") QString msg = isParsing() ? Tr::tr("The project is currently being parsed.")
: tr("The project could not be fully parsed."); : Tr::tr("The project could not be fully parsed.");
const FilePath projectFilePath = buildTarget(buildKey).projectFilePath; const FilePath projectFilePath = buildTarget(buildKey).projectFilePath;
if (!projectFilePath.isEmpty() && !projectFilePath.exists()) if (!projectFilePath.isEmpty() && !projectFilePath.exists())
msg += '\n' + tr("The project file \"%1\" does not exist.").arg(projectFilePath.toString()); msg += '\n' + Tr::tr("The project file \"%1\" does not exist.").arg(projectFilePath.toString());
return msg; return msg;
} }
return {}; return {};

View File

@@ -5,6 +5,7 @@
#include "editorconfiguration.h" #include "editorconfiguration.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include <cppeditor/cppeditorconstants.h> #include <cppeditor/cppeditorconstants.h>
@@ -50,7 +51,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project)
using namespace Utils::Layouting; using namespace Utils::Layouting;
Column { Column {
Row { new QLabel(tr("Language:")), languageComboBox, st }, Row { new QLabel(Tr::tr("Language:")), languageComboBox, st },
stackedWidget stackedWidget
}.attachTo(this, WithoutMargins); }.attachTo(this, WithoutMargins);
} }

View File

@@ -9,9 +9,9 @@
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorericons.h" #include "projectexplorericons.h"
#include "projectexplorersettings.h" #include "projectexplorersettings.h"
#include "projectexplorertr.h"
#include "showoutputtaskhandler.h" #include "showoutputtaskhandler.h"
#include "task.h" #include "task.h"
#include "taskhub.h"
#include <coreplugin/outputwindow.h> #include <coreplugin/outputwindow.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -64,7 +64,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
Utils::ProxyAction::proxyActionWithIcon(cancelBuildAction, Utils::ProxyAction::proxyActionWithIcon(cancelBuildAction,
Utils::Icons::STOP_SMALL_TOOLBAR.icon()); Utils::Icons::STOP_SMALL_TOOLBAR.icon());
m_cancelBuildButton->setDefaultAction(cancelBuildProxyButton); m_cancelBuildButton->setDefaultAction(cancelBuildProxyButton);
m_settingsButton->setToolTip(tr("Open Settings Page")); m_settingsButton->setToolTip(Tr::tr("Open Settings Page"));
m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon());
auto updateFontSettings = [this] { auto updateFontSettings = [this] {
@@ -96,9 +96,9 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
qRegisterMetaType<QTextCharFormat>("QTextCharFormat"); qRegisterMetaType<QTextCharFormat>("QTextCharFormat");
m_handler = new ShowOutputTaskHandler(this, m_handler = new ShowOutputTaskHandler(this,
tr("Show Compile &Output"), Tr::tr("Show Compile &Output"),
tr("Show the output that generated this issue in Compile Output."), Tr::tr("Show the output that generated this issue in Compile Output."),
tr("O")); Tr::tr("O"));
ExtensionSystem::PluginManager::addObject(m_handler); ExtensionSystem::PluginManager::addObject(m_handler);
setupContext(C_COMPILE_OUTPUT, m_outputWindow); setupContext(C_COMPILE_OUTPUT, m_outputWindow);
loadSettings(); loadSettings();
@@ -255,14 +255,13 @@ void CompileOutputWindow::storeSettings() const
class CompileOutputSettingsWidget : public Core::IOptionsPageWidget class CompileOutputSettingsWidget : public Core::IOptionsPageWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::CompileOutputSettingsPage)
public: public:
CompileOutputSettingsWidget() CompileOutputSettingsWidget()
{ {
const CompileOutputSettings &settings = BuildManager::compileOutputSettings(); const CompileOutputSettings &settings = BuildManager::compileOutputSettings();
m_wrapOutputCheckBox.setText(tr("Word-wrap output")); m_wrapOutputCheckBox.setText(Tr::tr("Word-wrap output"));
m_wrapOutputCheckBox.setChecked(settings.wrapOutput); m_wrapOutputCheckBox.setChecked(settings.wrapOutput);
m_popUpCheckBox.setText(tr("Open Compile Output when building")); m_popUpCheckBox.setText(Tr::tr("Open Compile Output when building"));
m_popUpCheckBox.setChecked(settings.popUp); m_popUpCheckBox.setChecked(settings.popUp);
m_maxCharsBox.setMaximum(100000000); m_maxCharsBox.setMaximum(100000000);
m_maxCharsBox.setValue(settings.maxCharCount); m_maxCharsBox.setValue(settings.maxCharCount);
@@ -270,7 +269,7 @@ public:
layout->addWidget(&m_wrapOutputCheckBox); layout->addWidget(&m_wrapOutputCheckBox);
layout->addWidget(&m_popUpCheckBox); layout->addWidget(&m_popUpCheckBox);
const auto maxCharsLayout = new QHBoxLayout; const auto maxCharsLayout = new QHBoxLayout;
const QString msg = tr("Limit output to %1 characters"); const QString msg = Tr::tr("Limit output to %1 characters");
const QStringList parts = msg.split("%1") << QString() << QString(); const QStringList parts = msg.split("%1") << QString() << QString();
maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed())); maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed()));
maxCharsLayout->addWidget(&m_maxCharsBox); maxCharsLayout->addWidget(&m_maxCharsBox);
@@ -298,7 +297,7 @@ private:
CompileOutputSettingsPage::CompileOutputSettingsPage() CompileOutputSettingsPage::CompileOutputSettingsPage()
{ {
setId(OPTIONS_PAGE_ID); setId(OPTIONS_PAGE_ID);
setDisplayName(CompileOutputSettingsWidget::tr("Compile Output")); setDisplayName(Tr::tr("Compile Output"));
setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setWidgetCreator([] { return new CompileOutputSettingsWidget; }); setWidgetCreator([] { return new CompileOutputSettingsWidget; });
} }

View File

@@ -4,7 +4,10 @@
#pragma once #pragma once
#include "buildstep.h" #include "buildstep.h"
#include "projectexplorersettings.h" #include "projectexplorersettings.h"
#include "projectexplorertr.h"
#include <coreplugin/dialogs/ioptionspage.h> #include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/ioutputpane.h> #include <coreplugin/ioutputpane.h>
@@ -33,7 +36,7 @@ public:
QWidget *outputWidget(QWidget *) override; QWidget *outputWidget(QWidget *) override;
QList<QWidget *> toolBarWidgets() const override; QList<QWidget *> toolBarWidgets() const override;
QString displayName() const override { return tr("Compile Output"); } QString displayName() const override { return Tr::tr("Compile Output"); }
int priorityInStatusBar() const override; int priorityInStatusBar() const override;
void clearContents() override; void clearContents() override;
bool canFocus() const override; bool canFocus() const override;

View File

@@ -3,6 +3,8 @@
#include "copytaskhandler.h" #include "copytaskhandler.h"
#include "projectexplorertr.h"
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
@@ -19,11 +21,11 @@ void CopyTaskHandler::handle(const Tasks &tasks)
switch (task.type) { switch (task.type) {
case Task::Error: case Task::Error:
//: Task is of type: error //: Task is of type: error
type = tr("error:") + QLatin1Char(' '); type = Tr::tr("error:") + QLatin1Char(' ');
break; break;
case Task::Warning: case Task::Warning:
//: Task is of type: warning //: Task is of type: warning
type = tr("warning:") + QLatin1Char(' '); type = Tr::tr("warning:") + QLatin1Char(' ');
break; break;
default: default:
break; break;

View File

@@ -2,8 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "currentprojectfilter.h" #include "currentprojectfilter.h"
#include "projecttree.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include "projecttree.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -15,8 +17,8 @@ CurrentProjectFilter::CurrentProjectFilter()
: BaseFileFilter() : BaseFileFilter()
{ {
setId("Files in current project"); setId("Files in current project");
setDisplayName(tr("Files in Current Project")); setDisplayName(Tr::tr("Files in Current Project"));
setDescription(tr("Matches all files from the current document's project. Append \"+<number>\" " setDescription(Tr::tr("Matches all files from the current document's project. Append \"+<number>\" "
"or \":<number>\" to jump to the given line number. Append another " "or \":<number>\" to jump to the given line number. Append another "
"\"+<number>\" or \":<number>\" to jump to the column number as well.")); "\"+<number>\" or \":<number>\" to jump to the column number as well."));
setDefaultShortcutString("p"); setDefaultShortcutString("p");

View File

@@ -4,6 +4,7 @@
#include "currentprojectfind.h" #include "currentprojectfind.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include "projecttree.h" #include "projecttree.h"
#include "session.h" #include "session.h"
@@ -38,9 +39,9 @@ QString CurrentProjectFind::displayName() const
{ {
Project *p = ProjectTree::currentProject(); Project *p = ProjectTree::currentProject();
if (p) if (p)
return tr("Project \"%1\"").arg(p->displayName()); return Tr::tr("Project \"%1\"").arg(p->displayName());
else else
return tr("Current Project"); return Tr::tr("Current Project");
} }
bool CurrentProjectFind::isEnabled() const bool CurrentProjectFind::isEnabled() const
@@ -74,7 +75,7 @@ QString CurrentProjectFind::label() const
{ {
Project *p = ProjectTree::currentProject(); Project *p = ProjectTree::currentProject();
QTC_ASSERT(p, return QString()); QTC_ASSERT(p, return QString());
return tr("Project \"%1\":").arg(p->displayName()); return Tr::tr("Project \"%1\":").arg(p->displayName());
} }
void CurrentProjectFind::handleProjectChanged() void CurrentProjectFind::handleProjectChanged()

View File

@@ -5,6 +5,7 @@
#include "localenvironmentaspect.h" #include "localenvironmentaspect.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "runconfigurationaspects.h" #include "runconfigurationaspects.h"
#include "target.h" #include "target.h"
@@ -71,15 +72,15 @@ Runnable CustomExecutableRunConfiguration::runnable() const
QString CustomExecutableRunConfiguration::defaultDisplayName() const QString CustomExecutableRunConfiguration::defaultDisplayName() const
{ {
if (executable().isEmpty()) if (executable().isEmpty())
return tr("Custom Executable"); return Tr::tr("Custom Executable");
return tr("Run %1").arg(executable().toUserOutput()); return Tr::tr("Run %1").arg(executable().toUserOutput());
} }
Tasks CustomExecutableRunConfiguration::checkForIssues() const Tasks CustomExecutableRunConfiguration::checkForIssues() const
{ {
Tasks tasks; Tasks tasks;
if (executable().isEmpty()) { if (executable().isEmpty()) {
tasks << createConfigurationIssue(tr("You need to set an executable in the custom run " tasks << createConfigurationIssue(Tr::tr("You need to set an executable in the custom run "
"configuration.")); "configuration."));
} }
return tasks; return tasks;
@@ -88,7 +89,7 @@ Tasks CustomExecutableRunConfiguration::checkForIssues() const
// Factories // Factories
CustomExecutableRunConfigurationFactory::CustomExecutableRunConfigurationFactory() : CustomExecutableRunConfigurationFactory::CustomExecutableRunConfigurationFactory() :
FixedRunConfigurationFactory(CustomExecutableRunConfiguration::tr("Custom Executable")) FixedRunConfigurationFactory(Tr::tr("Custom Executable"))
{ {
registerRunConfiguration<CustomExecutableRunConfiguration>(CUSTOM_EXECUTABLE_RUNCONFIG_ID); registerRunConfiguration<CustomExecutableRunConfiguration>(CUSTOM_EXECUTABLE_RUNCONFIG_ID);
} }

View File

@@ -3,11 +3,13 @@
#include "customparser.h" #include "customparser.h"
#include "projectexplorerconstants.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "task.h" #include "task.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -160,7 +162,7 @@ CustomParsersAspect::CustomParsersAspect(Target *target)
Q_UNUSED(target) Q_UNUSED(target)
setId("CustomOutputParsers"); setId("CustomOutputParsers");
setSettingsKey("CustomOutputParsers"); setSettingsKey("CustomOutputParsers");
setDisplayName(tr("Custom Output Parsers")); setDisplayName(Tr::tr("Custom Output Parsers"));
addDataExtractor(this, &CustomParsersAspect::parsers, &Data::parsers); addDataExtractor(this, &CustomParsersAspect::parsers, &Data::parsers);
setConfigWidgetCreator([this] { setConfigWidgetCreator([this] {
const auto widget = new Internal::CustomParsersSelectionWidget; const auto widget = new Internal::CustomParsersSelectionWidget;
@@ -261,7 +263,7 @@ public:
SelectionWidget(QWidget *parent = nullptr) : QWidget(parent) SelectionWidget(QWidget *parent = nullptr) : QWidget(parent)
{ {
const auto layout = new QVBoxLayout(this); const auto layout = new QVBoxLayout(this);
const auto explanatoryLabel = new QLabel(tr( const auto explanatoryLabel = new QLabel(Tr::tr(
"Custom output parsers scan command line output for user-provided error patterns<br>" "Custom output parsers scan command line output for user-provided error patterns<br>"
"to create entries in Issues.<br>" "to create entries in Issues.<br>"
"The parsers can be configured <a href=\"dummy\">here</a>.")); "The parsers can be configured <a href=\"dummy\">here</a>."));
@@ -343,9 +345,9 @@ void CustomParsersSelectionWidget::updateSummary()
const QList<Utils::Id> parsers const QList<Utils::Id> parsers
= qobject_cast<SelectionWidget *>(widget())->selectedParsers(); = qobject_cast<SelectionWidget *>(widget())->selectedParsers();
if (parsers.isEmpty()) if (parsers.isEmpty())
setSummaryText(tr("There are no custom parsers active")); setSummaryText(Tr::tr("There are no custom parsers active"));
else else
setSummaryText(tr("There are %n custom parsers active", nullptr, parsers.count())); setSummaryText(Tr::tr("There are %n custom parsers active", nullptr, parsers.count()));
} }
} // namespace Internal } // namespace Internal

View File

@@ -3,6 +3,8 @@
#include "customparserconfigdialog.h" #include "customparserconfigdialog.h"
#include "projectexplorertr.h"
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
#include <utils/theme/theme.h> #include <utils/theme/theme.h>
@@ -27,15 +29,15 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
resize(516, 480); resize(516, 480);
setWindowTitle(tr("Custom Parser")); setWindowTitle(Tr::tr("Custom Parser"));
m_errorPattern = new QLineEdit; m_errorPattern = new QLineEdit;
auto label_1 = new QLabel(tr("&Error message capture pattern:")); auto label_1 = new QLabel(Tr::tr("&Error message capture pattern:"));
label_1->setBuddy(m_errorPattern); label_1->setBuddy(m_errorPattern);
auto label = new QLabel(tr("&File name:")); auto label = new QLabel(Tr::tr("&File name:"));
auto label_2 = new QLabel(tr("&Line number:")); auto label_2 = new QLabel(Tr::tr("&Line number:"));
auto label_3 = new QLabel(tr("&Message:")); auto label_3 = new QLabel(Tr::tr("&Message:"));
m_errorFileNameCap = new QSpinBox; m_errorFileNameCap = new QSpinBox;
m_errorFileNameCap->setMaximum(9); m_errorFileNameCap->setMaximum(9);
@@ -53,10 +55,10 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
label_2->setBuddy(m_errorLineNumberCap); label_2->setBuddy(m_errorLineNumberCap);
label_3->setBuddy(m_errorMessageCap); label_3->setBuddy(m_errorMessageCap);
m_errorStdOutChannel = new QCheckBox(tr("Standard output")); m_errorStdOutChannel = new QCheckBox(Tr::tr("Standard output"));
m_errorStdErrChannel = new QCheckBox(tr("Standard error")); m_errorStdErrChannel = new QCheckBox(Tr::tr("Standard error"));
auto label_5 = new QLabel(tr("E&rror message:")); auto label_5 = new QLabel(Tr::tr("E&rror message:"));
m_errorOutputMessage = new QLineEdit; m_errorOutputMessage = new QLineEdit;
m_errorFileNameTest = new QLabel; m_errorFileNameTest = new QLabel;
m_errorLineNumberTest = new QLabel; m_errorLineNumberTest = new QLabel;
@@ -66,9 +68,9 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
m_warningPattern = new QLineEdit; m_warningPattern = new QLineEdit;
auto label_11 = new QLabel(tr("&File name:")); auto label_11 = new QLabel(Tr::tr("&File name:"));
auto label_12 = new QLabel(tr("&Line number:")); auto label_12 = new QLabel(Tr::tr("&Line number:"));
auto label_13 = new QLabel(tr("&Message:")); auto label_13 = new QLabel(Tr::tr("&Message:"));
m_warningLineNumberCap = new QSpinBox; m_warningLineNumberCap = new QSpinBox;
m_warningLineNumberCap->setMaximum(9); m_warningLineNumberCap->setMaximum(9);
@@ -86,10 +88,10 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
label_12->setBuddy(m_warningLineNumberCap); label_12->setBuddy(m_warningLineNumberCap);
label_13->setBuddy(m_warningMessageCap); label_13->setBuddy(m_warningMessageCap);
m_warningStdOutChannel = new QCheckBox(tr("Standard output")); m_warningStdOutChannel = new QCheckBox(Tr::tr("Standard output"));
m_warningStdErrChannel = new QCheckBox(tr("Standard error")); m_warningStdErrChannel = new QCheckBox(Tr::tr("Standard error"));
auto label_14 = new QLabel(tr("Warning message:")); auto label_14 = new QLabel(Tr::tr("Warning message:"));
m_warningOutputMessage = new QLineEdit; m_warningOutputMessage = new QLineEdit;
m_warningFileNameTest = new QLabel; m_warningFileNameTest = new QLabel;
m_warningLineNumberTest = new QLabel; m_warningLineNumberTest = new QLabel;
@@ -103,28 +105,28 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
auto tabWarning = new QWidget; auto tabWarning = new QWidget;
Column { Column {
tr("Warning message capture pattern:"), Tr::tr("Warning message capture pattern:"),
m_warningPattern, m_warningPattern,
Group { Group {
title(tr("Capture Positions")), title(Tr::tr("Capture Positions")),
Grid { Grid {
label_11, label_12, label_13, br, label_11, label_12, label_13, br,
m_warningFileNameCap, m_warningLineNumberCap, m_warningMessageCap m_warningFileNameCap, m_warningLineNumberCap, m_warningMessageCap
} }
}, },
Group { Group {
title(tr("Capture Output Channels")), title(Tr::tr("Capture Output Channels")),
Row { m_warningStdOutChannel, m_warningStdErrChannel } Row { m_warningStdOutChannel, m_warningStdErrChannel }
}, },
Group { Group {
title(tr("Test")), title(Tr::tr("Test")),
Column { Column {
label_14, label_14,
m_warningOutputMessage, m_warningOutputMessage,
Form { Form {
tr("File name:"), m_warningFileNameTest, br, Tr::tr("File name:"), m_warningFileNameTest, br,
tr("Line number:"), m_warningLineNumberTest, br, Tr::tr("Line number:"), m_warningLineNumberTest, br,
tr("Message:"), m_warningMessageTest Tr::tr("Message:"), m_warningMessageTest
} }
} }
} }
@@ -135,33 +137,33 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
label_1, label_1,
m_errorPattern, m_errorPattern,
Group { Group {
title(tr("Capture Positions")), title(Tr::tr("Capture Positions")),
Grid { Grid {
label, label_2, label_3, br, label, label_2, label_3, br,
m_errorFileNameCap, m_errorLineNumberCap, m_errorMessageCap m_errorFileNameCap, m_errorLineNumberCap, m_errorMessageCap
} }
}, },
Group { Group {
title(tr("Capture Output Channels")), title(Tr::tr("Capture Output Channels")),
Row { m_errorStdOutChannel, m_errorStdErrChannel } Row { m_errorStdOutChannel, m_errorStdErrChannel }
}, },
Group { Group {
title(tr("Test")), title(Tr::tr("Test")),
Column { Column {
label_5, label_5,
m_errorOutputMessage, m_errorOutputMessage,
Form { Form {
tr("File name:"), m_errorFileNameTest, br, Tr::tr("File name:"), m_errorFileNameTest, br,
tr("Line number:"), m_errorLineNumberTest, br, Tr::tr("Line number:"), m_errorLineNumberTest, br,
tr("Message:"), m_errorMessageTest Tr::tr("Message:"), m_errorMessageTest
} }
} }
}, },
}.attachTo(tabError); }.attachTo(tabError);
auto tabWidget = new QTabWidget(this); auto tabWidget = new QTabWidget(this);
tabWidget->addTab(tabError, tr("Error")); tabWidget->addTab(tabError, Tr::tr("Error"));
tabWidget->addTab(tabWarning, tr("Warning")); tabWidget->addTab(tabWarning, Tr::tr("Warning"));
tabWidget->setCurrentIndex(0); tabWidget->setCurrentIndex(0);
Column { Column {
@@ -414,15 +416,15 @@ bool CustomParserConfigDialog::checkPattern(QLineEdit *pattern, const QString &o
if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) { if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) {
*errorMessage = QString::fromLatin1("<font color=\"%1\">%2 ").arg( *errorMessage = QString::fromLatin1("<font color=\"%1\">%2 ").arg(
Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(), Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),
tr("Not applicable:")); Tr::tr("Not applicable:"));
if (rx.pattern().isEmpty()) if (rx.pattern().isEmpty())
*errorMessage += tr("Pattern is empty."); *errorMessage += Tr::tr("Pattern is empty.");
else if (!rx.isValid()) else if (!rx.isValid())
*errorMessage += rx.errorString(); *errorMessage += rx.errorString();
else if (outputText.isEmpty()) else if (outputText.isEmpty())
*errorMessage += tr("No message given."); *errorMessage += Tr::tr("No message given.");
else else
*errorMessage += tr("Pattern does not match the message."); *errorMessage += Tr::tr("Pattern does not match the message.");
return false; return false;
} }

View File

@@ -7,6 +7,7 @@
#include "customparserconfigdialog.h" #include "customparserconfigdialog.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -24,8 +25,6 @@ namespace Internal {
class CustomParsersSettingsWidget final : public Core::IOptionsPageWidget class CustomParsersSettingsWidget final : public Core::IOptionsPageWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::CustomParsersSettingsPage)
public: public:
CustomParsersSettingsWidget() CustomParsersSettingsWidget()
{ {
@@ -35,15 +34,15 @@ public:
const auto mainLayout = new QVBoxLayout(this); const auto mainLayout = new QVBoxLayout(this);
const auto widgetLayout = new QHBoxLayout; const auto widgetLayout = new QHBoxLayout;
mainLayout->addLayout(widgetLayout); mainLayout->addLayout(widgetLayout);
const auto hintLabel = new QLabel(tr( const auto hintLabel = new QLabel(Tr::tr(
"Custom output parsers defined here can be enabled individually " "Custom output parsers defined here can be enabled individually "
"in the project's build or run settings.")); "in the project's build or run settings."));
mainLayout->addWidget(hintLabel); mainLayout->addWidget(hintLabel);
widgetLayout->addWidget(&m_parserListView); widgetLayout->addWidget(&m_parserListView);
const auto buttonLayout = new QVBoxLayout; const auto buttonLayout = new QVBoxLayout;
widgetLayout->addLayout(buttonLayout); widgetLayout->addLayout(buttonLayout);
const auto addButton = new QPushButton(tr("Add...")); const auto addButton = new QPushButton(Tr::tr("Add..."));
const auto removeButton = new QPushButton(tr("Remove")); const auto removeButton = new QPushButton(Tr::tr("Remove"));
const auto editButton = new QPushButton("Edit..."); const auto editButton = new QPushButton("Edit...");
buttonLayout->addWidget(addButton); buttonLayout->addWidget(addButton);
buttonLayout->addWidget(removeButton); buttonLayout->addWidget(removeButton);
@@ -57,7 +56,7 @@ public:
return; return;
CustomParserSettings newParser = dlg.settings(); CustomParserSettings newParser = dlg.settings();
newParser.id = Utils::Id::fromString(QUuid::createUuid().toString()); newParser.id = Utils::Id::fromString(QUuid::createUuid().toString());
newParser.displayName = tr("New Parser"); newParser.displayName = Tr::tr("New Parser");
m_customParsers << newParser; m_customParsers << newParser;
resetListView(); resetListView();
}); });
@@ -118,7 +117,7 @@ private:
CustomParsersSettingsPage::CustomParsersSettingsPage() CustomParsersSettingsPage::CustomParsersSettingsPage()
{ {
setId(Constants::CUSTOM_PARSERS_SETTINGS_PAGE_ID); setId(Constants::CUSTOM_PARSERS_SETTINGS_PAGE_ID);
setDisplayName(CustomParsersSettingsWidget::tr("Custom Output Parsers")); setDisplayName(Tr::tr("Custom Output Parsers"));
setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY);
setWidgetCreator([] { return new CustomParsersSettingsWidget; }); setWidgetCreator([] { return new CustomParsersSettingsWidget; });
} }

View File

@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "customtoolchain.h" #include "customtoolchain.h"
#include "abiwidget.h" #include "abiwidget.h"
#include "gccparser.h" #include "gccparser.h"
#include "clangparser.h" #include "clangparser.h"
@@ -10,6 +11,7 @@
#include "customparser.h" #include "customparser.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "projectmacro.h" #include "projectmacro.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -49,7 +51,7 @@ CustomToolChain::CustomToolChain() :
ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID), ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID),
m_outputParserId(GccParser::id()) m_outputParserId(GccParser::id())
{ {
setTypeDisplayName(tr("Custom")); setTypeDisplayName(Tr::tr("Custom"));
setTargetAbiKey("ProjectExplorer.CustomToolChain.TargetAbi"); setTargetAbiKey("ProjectExplorer.CustomToolChain.TargetAbi");
setCompilerCommandKey("ProjectExplorer.CustomToolChain.CompilerPath"); setCompilerCommandKey("ProjectExplorer.CustomToolChain.CompilerPath");
} }
@@ -273,10 +275,10 @@ void CustomToolChain::setOutputParserId(Utils::Id parserId)
QList<CustomToolChain::Parser> CustomToolChain::parsers() QList<CustomToolChain::Parser> CustomToolChain::parsers()
{ {
QList<CustomToolChain::Parser> result; QList<CustomToolChain::Parser> result;
result.append({GccParser::id(), tr("GCC")}); result.append({GccParser::id(), Tr::tr("GCC")});
result.append({ClangParser::id(), tr("Clang")}); result.append({ClangParser::id(), Tr::tr("Clang")});
result.append({LinuxIccParser::id(), tr("ICC")}); result.append({LinuxIccParser::id(), Tr::tr("ICC")});
result.append({MsvcParser::id(), tr("MSVC")}); result.append({MsvcParser::id(), Tr::tr("MSVC")});
return result; return result;
} }
@@ -293,7 +295,7 @@ namespace Internal {
CustomToolChainFactory::CustomToolChainFactory() CustomToolChainFactory::CustomToolChainFactory()
{ {
setDisplayName(CustomToolChain::tr("Custom")); setDisplayName(Tr::tr("Custom"));
setSupportedToolChainType(Constants::CUSTOM_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::CUSTOM_TOOLCHAIN_TYPEID);
setSupportsAllLanguages(true); setSupportsAllLanguages(true);
setToolchainConstructor([] { return new CustomToolChain; }); setToolchainConstructor([] { return new CustomToolChain; });
@@ -306,7 +308,6 @@ CustomToolChainFactory::CustomToolChainFactory()
class TextEditDetailsWidget : public DetailsWidget class TextEditDetailsWidget : public DetailsWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::TextEditDetailsWidget)
public: public:
TextEditDetailsWidget(QPlainTextEdit *textEdit) TextEditDetailsWidget(QPlainTextEdit *textEdit)
{ {
@@ -341,7 +342,7 @@ public:
void updateSummaryText() void updateSummaryText()
{ {
int count = entryCount(); int count = entryCount();
setSummaryText(count ? tr("%n entries", "", count) : tr("Empty")); setSummaryText(count ? Tr::tr("%n entries", "", count) : Tr::tr("Empty"));
} }
}; };
@@ -373,26 +374,26 @@ CustomToolChainConfigWidget::CustomToolChainConfigWidget(CustomToolChain *tc) :
auto parserLayoutWidget = new QWidget; auto parserLayoutWidget = new QWidget;
auto parserLayout = new QHBoxLayout(parserLayoutWidget); auto parserLayout = new QHBoxLayout(parserLayoutWidget);
parserLayout->setContentsMargins(0, 0, 0, 0); parserLayout->setContentsMargins(0, 0, 0, 0);
m_predefinedMacros->setPlaceholderText(tr("MACRO[=VALUE]")); m_predefinedMacros->setPlaceholderText(Tr::tr("MACRO[=VALUE]"));
m_predefinedMacros->setTabChangesFocus(true); m_predefinedMacros->setTabChangesFocus(true);
m_predefinedMacros->setToolTip(tr("Each line defines a macro. Format is MACRO[=VALUE].")); m_predefinedMacros->setToolTip(Tr::tr("Each line defines a macro. Format is MACRO[=VALUE]."));
m_headerPaths->setTabChangesFocus(true); m_headerPaths->setTabChangesFocus(true);
m_headerPaths->setToolTip(tr("Each line adds a global header lookup path.")); m_headerPaths->setToolTip(Tr::tr("Each line adds a global header lookup path."));
m_cxx11Flags->setToolTip(tr("Comma-separated list of flags that turn on C++11 support.")); m_cxx11Flags->setToolTip(Tr::tr("Comma-separated list of flags that turn on C++11 support."));
m_mkspecs->setToolTip(tr("Comma-separated list of mkspecs.")); m_mkspecs->setToolTip(Tr::tr("Comma-separated list of mkspecs."));
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand); m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
m_compilerCommand->setHistoryCompleter(QLatin1String("PE.ToolChainCommand.History")); m_compilerCommand->setHistoryCompleter(QLatin1String("PE.ToolChainCommand.History"));
m_makeCommand->setExpectedKind(PathChooser::ExistingCommand); m_makeCommand->setExpectedKind(PathChooser::ExistingCommand);
m_makeCommand->setHistoryCompleter(QLatin1String("PE.MakeCommand.History")); m_makeCommand->setHistoryCompleter(QLatin1String("PE.MakeCommand.History"));
m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand); m_mainLayout->addRow(Tr::tr("&Compiler path:"), m_compilerCommand);
m_mainLayout->addRow(tr("&Make path:"), m_makeCommand); m_mainLayout->addRow(Tr::tr("&Make path:"), m_makeCommand);
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget); m_mainLayout->addRow(Tr::tr("&ABI:"), m_abiWidget);
m_mainLayout->addRow(tr("&Predefined macros:"), m_predefinedDetails); m_mainLayout->addRow(Tr::tr("&Predefined macros:"), m_predefinedDetails);
m_mainLayout->addRow(tr("&Header paths:"), m_headerDetails); m_mainLayout->addRow(Tr::tr("&Header paths:"), m_headerDetails);
m_mainLayout->addRow(tr("C++11 &flags:"), m_cxx11Flags); m_mainLayout->addRow(Tr::tr("C++11 &flags:"), m_cxx11Flags);
m_mainLayout->addRow(tr("&Qt mkspecs:"), m_mkspecs); m_mainLayout->addRow(Tr::tr("&Qt mkspecs:"), m_mkspecs);
parserLayout->addWidget(m_errorParserComboBox); parserLayout->addWidget(m_errorParserComboBox);
m_mainLayout->addRow(tr("&Error parser:"), parserLayoutWidget); m_mainLayout->addRow(Tr::tr("&Error parser:"), parserLayoutWidget);
addErrorLabel(); addErrorLabel();
setFromToolchain(); setFromToolchain();

View File

@@ -33,8 +33,6 @@ namespace Internal { class CustomToolChainFactory; }
class PROJECTEXPLORER_EXPORT CustomToolChain : public ToolChain class PROJECTEXPLORER_EXPORT CustomToolChain : public ToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(CustomToolChain)
public: public:
class Parser { class Parser {
public: public:

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "customwizardpage.h" #include "customwizardpage.h"
#include "customwizardparameters.h" #include "customwizardparameters.h"
#include "../projectexplorertr.h"
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -406,7 +408,7 @@ CustomWizardPage::CustomWizardPage(const QSharedPointer<CustomWizardContext> &ct
m_pathChooser(new PathChooser) m_pathChooser(new PathChooser)
{ {
m_pathChooser->setHistoryCompleter(QLatin1String("PE.ProjectDir.History")); m_pathChooser->setHistoryCompleter(QLatin1String("PE.ProjectDir.History"));
addRow(tr("Path:"), m_pathChooser); addRow(Tr::tr("Path:"), m_pathChooser);
connect(m_pathChooser, &PathChooser::validChanged, this, &QWizardPage::completeChanged); connect(m_pathChooser, &PathChooser::validChanged, this, &QWizardPage::completeChanged);
} }

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "customwizardparameters.h" #include "customwizardparameters.h"
#include "customwizardscriptgenerator.h" #include "customwizardscriptgenerator.h"
#include "../projectexplorertr.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <cppeditor/cppeditorconstants.h> #include <cppeditor/cppeditorconstants.h>
@@ -228,7 +230,7 @@ static inline bool assignLanguageElementText(QXmlStreamReader &reader,
const auto elementLanguage = reader.attributes().value(QLatin1String(langAttributeC)); const auto elementLanguage = reader.attributes().value(QLatin1String(langAttributeC));
if (elementLanguage.isEmpty()) { if (elementLanguage.isEmpty()) {
// Try to find a translation for our built-in Wizards // Try to find a translation for our built-in Wizards
*target = QCoreApplication::translate("ProjectExplorer::CustomWizard", reader.readElementText().toLatin1().constData()); *target = Tr::tr(reader.readElementText().toLatin1().constData());
return true; return true;
} }
if (elementLanguage == desiredLanguage) { if (elementLanguage == desiredLanguage) {

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "dependenciespanel.h" #include "dependenciespanel.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -64,7 +66,7 @@ QVariant DependenciesModel::data(const QModelIndex &index, int role) const
{ {
if (m_projects.isEmpty()) if (m_projects.isEmpty())
return role == Qt::DisplayRole return role == Qt::DisplayRole
? tr("<No other projects in this session>") ? Tr::tr("<No other projects in this session>")
: QVariant(); : QVariant();
const Project *p = m_projects.at(index.row()); const Project *p = m_projects.at(index.row());
@@ -94,8 +96,8 @@ bool DependenciesModel::setData(const QModelIndex &index, const QVariant &value,
emit dataChanged(index, index); emit dataChanged(index, index);
return true; return true;
} else { } else {
QMessageBox::warning(Core::ICore::dialogParent(), QCoreApplication::translate("DependenciesModel", "Unable to Add Dependency"), QMessageBox::warning(Core::ICore::dialogParent(), Tr::tr("Unable to Add Dependency"),
QCoreApplication::translate("DependenciesModel", "This would create a circular dependency.")); Tr::tr("This would create a circular dependency."));
} }
} else if (c == Qt::Unchecked) { } else if (c == Qt::Unchecked) {
if (SessionManager::hasDependency(m_project, p)) { if (SessionManager::hasDependency(m_project, p)) {
@@ -211,8 +213,8 @@ DependenciesWidget::DependenciesWidget(Project *project, QWidget *parent) : Proj
layout->addItem(new QSpacerItem(0, 0 , QSizePolicy::Expanding, QSizePolicy::Fixed), 0, 1); layout->addItem(new QSpacerItem(0, 0 , QSizePolicy::Expanding, QSizePolicy::Fixed), 0, 1);
m_cascadeSetActiveCheckBox = new QCheckBox; m_cascadeSetActiveCheckBox = new QCheckBox;
m_cascadeSetActiveCheckBox->setText(tr("Synchronize configuration")); m_cascadeSetActiveCheckBox->setText(Tr::tr("Synchronize configuration"));
m_cascadeSetActiveCheckBox->setToolTip(tr("Synchronize active kit, build, and deploy configuration between projects.")); m_cascadeSetActiveCheckBox->setToolTip(Tr::tr("Synchronize active kit, build, and deploy configuration between projects."));
m_cascadeSetActiveCheckBox->setChecked(SessionManager::isProjectConfigurationCascading()); m_cascadeSetActiveCheckBox->setChecked(SessionManager::isProjectConfigurationCascading());
connect(m_cascadeSetActiveCheckBox, &QCheckBox::toggled, connect(m_cascadeSetActiveCheckBox, &QCheckBox::toggled,
SessionManager::instance(), &SessionManager::setProjectConfigurationCascading); SessionManager::instance(), &SessionManager::setProjectConfigurationCascading);

View File

@@ -8,6 +8,7 @@
#include "kitinformation.h" #include "kitinformation.h"
#include "project.h" #include "project.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -30,7 +31,7 @@ DeployConfiguration::DeployConfiguration(Target *target, Id id)
{ {
QTC_CHECK(target && target == this->target()); QTC_CHECK(target && target == this->target());
//: Default DeployConfiguration display name //: Default DeployConfiguration display name
setDefaultDisplayName(tr("Deploy locally")); setDefaultDisplayName(Tr::tr("Deploy locally"));
} }
BuildStepList *DeployConfiguration::stepList() BuildStepList *DeployConfiguration::stepList()
@@ -248,7 +249,7 @@ DefaultDeployConfigurationFactory::DefaultDeployConfigurationFactory()
setConfigBaseId("ProjectExplorer.DefaultDeployConfiguration"); setConfigBaseId("ProjectExplorer.DefaultDeployConfiguration");
addSupportedTargetDeviceType(Constants::DESKTOP_DEVICE_TYPE); addSupportedTargetDeviceType(Constants::DESKTOP_DEVICE_TYPE);
//: Display name of the default deploy configuration //: Display name of the default deploy configuration
setDefaultDisplayName(DeployConfiguration::tr("Deploy Configuration")); setDefaultDisplayName(Tr::tr("Deploy Configuration"));
} }
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -6,6 +6,7 @@
#include "buildsystem.h" #include "buildsystem.h"
#include "deployconfiguration.h" #include "deployconfiguration.h"
#include "deploymentdata.h" #include "deploymentdata.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -65,7 +66,7 @@ public:
DeploymentDataView::DeploymentDataView(DeployConfiguration *dc) DeploymentDataView::DeploymentDataView(DeployConfiguration *dc)
{ {
auto model = new TreeModel<DeploymentDataItem>(this); auto model = new TreeModel<DeploymentDataItem>(this);
model->setHeader({tr("Source File Path"), tr("Target Directory")}); model->setHeader({Tr::tr("Source File Path"), Tr::tr("Target Directory")});
auto view = new QTreeView(this); auto view = new QTreeView(this);
view->setMinimumSize(QSize(100, 100)); view->setMinimumSize(QSize(100, 100));
@@ -75,8 +76,8 @@ DeploymentDataView::DeploymentDataView(DeployConfiguration *dc)
view->setModel(model); view->setModel(model);
const auto buttonsLayout = new QVBoxLayout; const auto buttonsLayout = new QVBoxLayout;
const auto addButton = new QPushButton(tr("Add")); const auto addButton = new QPushButton(Tr::tr("Add"));
const auto removeButton = new QPushButton(tr("Remove")); const auto removeButton = new QPushButton(Tr::tr("Remove"));
buttonsLayout->addWidget(addButton); buttonsLayout->addWidget(addButton);
buttonsLayout->addWidget(removeButton); buttonsLayout->addWidget(removeButton);
buttonsLayout->addStretch(1); buttonsLayout->addStretch(1);
@@ -85,8 +86,8 @@ DeploymentDataView::DeploymentDataView(DeployConfiguration *dc)
viewLayout->addWidget(view); viewLayout->addWidget(view);
viewLayout->addLayout(buttonsLayout); viewLayout->addLayout(buttonsLayout);
auto label = new QLabel(tr("Files to deploy:"), this); auto label = new QLabel(Tr::tr("Files to deploy:"), this);
const auto sourceCheckBox = new QCheckBox(tr("Override deployment data from build system")); const auto sourceCheckBox = new QCheckBox(Tr::tr("Override deployment data from build system"));
sourceCheckBox->setChecked(dc->usesCustomDeploymentData()); sourceCheckBox->setChecked(dc->usesCustomDeploymentData());
auto layout = new QVBoxLayout(this); auto layout = new QVBoxLayout(this);

View File

@@ -6,6 +6,7 @@
#include "buildsystem.h" #include "buildsystem.h"
#include "localenvironmentaspect.h" #include "localenvironmentaspect.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "runconfigurationaspects.h" #include "runconfigurationaspects.h"
#include "target.h" #include "target.h"
@@ -26,8 +27,6 @@ namespace Internal {
class DesktopRunConfiguration : public RunConfiguration class DesktopRunConfiguration : public RunConfiguration
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::DesktopRunConfiguration)
protected: protected:
enum Kind { Qmake, Qbs, CMake }; // FIXME: Remove enum Kind { Qmake, Qbs, CMake }; // FIXME: Remove
@@ -94,7 +93,7 @@ void DesktopRunConfiguration::updateTargetInformation()
FilePath profile = FilePath::fromString(buildKey()); FilePath profile = FilePath::fromString(buildKey());
if (profile.isEmpty()) if (profile.isEmpty())
setDefaultDisplayName(tr("Qt Run Configuration")); setDefaultDisplayName(Tr::tr("Qt Run Configuration"));
else else
setDefaultDisplayName(profile.completeBaseName()); setDefaultDisplayName(profile.completeBaseName());

View File

@@ -2,14 +2,15 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "desktopdevice.h" #include "desktopdevice.h"
#include "desktopprocesssignaloperation.h"
#include "deviceprocesslist.h" #include "deviceprocesslist.h"
#include "localprocesslist.h" #include "localprocesslist.h"
#include "desktopprocesssignaloperation.h" #include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include <coreplugin/fileutils.h> #include <coreplugin/fileutils.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/devicefileaccess.h> #include <utils/devicefileaccess.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
@@ -32,8 +33,8 @@ DesktopDevice::DesktopDevice()
setupId(IDevice::AutoDetected, DESKTOP_DEVICE_ID); setupId(IDevice::AutoDetected, DESKTOP_DEVICE_ID);
setType(DESKTOP_DEVICE_TYPE); setType(DESKTOP_DEVICE_TYPE);
setDefaultDisplayName(tr("Local PC")); setDefaultDisplayName(Tr::tr("Local PC"));
setDisplayType(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop")); setDisplayType(Tr::tr("Desktop"));
setDeviceState(IDevice::DeviceStateUnknown); setDeviceState(IDevice::DeviceStateUnknown);
setMachineType(IDevice::Hardware); setMachineType(IDevice::Hardware);

View File

@@ -17,8 +17,6 @@ namespace Internal { class DesktopDeviceFactory; }
class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::DesktopDevice)
public: public:
IDevice::DeviceInfo deviceInformation() const override; IDevice::DeviceInfo deviceInformation() const override;

View File

@@ -3,10 +3,13 @@
#include "desktopdevicefactory.h" #include "desktopdevicefactory.h"
#include "desktopdevice.h" #include "desktopdevice.h"
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h> #include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/projectexplorertr.h>
#include <coreplugin/coreicons.h> #include <coreplugin/coreicons.h>
#include <utils/icon.h> #include <utils/icon.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -19,7 +22,7 @@ DesktopDeviceFactory::DesktopDeviceFactory()
: IDeviceFactory(Constants::DESKTOP_DEVICE_TYPE) : IDeviceFactory(Constants::DESKTOP_DEVICE_TYPE)
{ {
setConstructionFunction([] { return IDevice::Ptr(new DesktopDevice); }); setConstructionFunction([] { return IDevice::Ptr(new DesktopDevice); });
setDisplayName(DesktopDevice::tr("Desktop")); setDisplayName(Tr::tr("Desktop"));
setIcon(Utils::creatorTheme()->flag(Utils::Theme::FlatSideBarIcons) setIcon(Utils::creatorTheme()->flag(Utils::Theme::FlatSideBarIcons)
? Utils::Icon::combinedIcon( ? Utils::Icon::combinedIcon(
{Icons::DESKTOP_DEVICE.icon(), Core::Icons::DESKTOP_DEVICE_SMALL.icon()}) {Icons::DESKTOP_DEVICE.icon(), Core::Icons::DESKTOP_DEVICE_SMALL.icon()})

View File

@@ -3,6 +3,8 @@
#include "desktopprocesssignaloperation.h" #include "desktopprocesssignaloperation.h"
#include "../projectexplorertr.h"
#include <app/app_version.h> #include <app/app_version.h>
#include <utils/winutils.h> #include <utils/winutils.h>
@@ -66,7 +68,7 @@ void DesktopProcessSignalOperation::appendMsgCannotKill(qint64 pid, const QStrin
{ {
if (!m_errorMessage.isEmpty()) if (!m_errorMessage.isEmpty())
m_errorMessage += QChar::fromLatin1('\n'); m_errorMessage += QChar::fromLatin1('\n');
m_errorMessage += tr("Cannot kill process with pid %1: %2").arg(pid).arg(why); m_errorMessage += Tr::tr("Cannot kill process with pid %1: %2").arg(pid).arg(why);
m_errorMessage += QLatin1Char(' '); m_errorMessage += QLatin1Char(' ');
} }
@@ -74,7 +76,7 @@ void DesktopProcessSignalOperation::appendMsgCannotInterrupt(qint64 pid, const Q
{ {
if (!m_errorMessage.isEmpty()) if (!m_errorMessage.isEmpty())
m_errorMessage += QChar::fromLatin1('\n'); m_errorMessage += QChar::fromLatin1('\n');
m_errorMessage += tr("Cannot interrupt process with pid %1: %2").arg(pid).arg(why); m_errorMessage += Tr::tr("Cannot interrupt process with pid %1: %2").arg(pid).arg(why);
m_errorMessage += QLatin1Char(' '); m_errorMessage += QLatin1Char(' ');
} }
@@ -89,11 +91,11 @@ void DesktopProcessSignalOperation::killProcessSilently(qint64 pid)
appendMsgCannotKill(pid, winErrorMessage(GetLastError())); appendMsgCannotKill(pid, winErrorMessage(GetLastError()));
CloseHandle(handle); CloseHandle(handle);
} else { } else {
appendMsgCannotKill(pid, tr("Cannot open process.")); appendMsgCannotKill(pid, Tr::tr("Cannot open process."));
} }
#else #else
if (pid <= 0) if (pid <= 0)
appendMsgCannotKill(pid, tr("Invalid process id.")); appendMsgCannotKill(pid, Tr::tr("Invalid process id."));
else if (kill(pid, SIGKILL)) else if (kill(pid, SIGKILL))
appendMsgCannotKill(pid, QString::fromLocal8Bit(strerror(errno))); appendMsgCannotKill(pid, QString::fromLocal8Bit(strerror(errno)));
#endif // Q_OS_WIN #endif // Q_OS_WIN
@@ -144,7 +146,7 @@ GDB 32bit | Api | Api | N/A | Win32
|PROCESS_DUP_HANDLE|PROCESS_TERMINATE|PROCESS_CREATE_THREAD|PROCESS_SUSPEND_RESUME; |PROCESS_DUP_HANDLE|PROCESS_TERMINATE|PROCESS_CREATE_THREAD|PROCESS_SUSPEND_RESUME;
inferior = OpenProcess(rights, FALSE, pid); inferior = OpenProcess(rights, FALSE, pid);
if (inferior == NULL) { if (inferior == NULL) {
appendMsgCannotInterrupt(pid, tr("Cannot open process: %1") appendMsgCannotInterrupt(pid, Tr::tr("Cannot open process: %1")
+ winErrorMessage(GetLastError())); + winErrorMessage(GetLastError()));
break; break;
} }
@@ -155,7 +157,7 @@ GDB 32bit | Api | Api | N/A | Win32
|| (si == Win64Interrupt && creatorIs64Bit) || (si == Win64Interrupt && creatorIs64Bit)
|| (si == Win32Interrupt && !creatorIs64Bit)) { || (si == Win32Interrupt && !creatorIs64Bit)) {
if (!DebugBreakProcess(inferior)) { if (!DebugBreakProcess(inferior)) {
appendMsgCannotInterrupt(pid, tr("DebugBreakProcess failed:") appendMsgCannotInterrupt(pid, Tr::tr("DebugBreakProcess failed:")
+ QLatin1Char(' ') + winErrorMessage(GetLastError())); + QLatin1Char(' ') + winErrorMessage(GetLastError()));
} }
} else if (si == Win32Interrupt || si == Win64Interrupt) { } else if (si == Win32Interrupt || si == Win64Interrupt) {
@@ -165,7 +167,7 @@ GDB 32bit | Api | Api | N/A | Win32
: QLatin1String("/win64interrupt.exe"); : QLatin1String("/win64interrupt.exe");
if (!QFile::exists(executable)) { if (!QFile::exists(executable)) {
appendMsgCannotInterrupt(pid, appendMsgCannotInterrupt(pid,
tr("%1 does not exist. If you built %2 " Tr::tr("%1 does not exist. If you built %2 "
"yourself, check out https://code.qt.io/cgit/" "yourself, check out https://code.qt.io/cgit/"
"qt-creator/binary-artifacts.git/.") "qt-creator/binary-artifacts.git/.")
.arg(QDir::toNativeSeparators(executable), .arg(QDir::toNativeSeparators(executable),
@@ -173,7 +175,7 @@ GDB 32bit | Api | Api | N/A | Win32
} }
switch (QProcess::execute(executable, QStringList(QString::number(pid)))) { switch (QProcess::execute(executable, QStringList(QString::number(pid)))) {
case -2: case -2:
appendMsgCannotInterrupt(pid, tr( appendMsgCannotInterrupt(pid, Tr::tr(
"Cannot start %1. Check src\\tools\\win64interrupt\\win64interrupt.c " "Cannot start %1. Check src\\tools\\win64interrupt\\win64interrupt.c "
"for more information.").arg(QDir::toNativeSeparators(executable))); "for more information.").arg(QDir::toNativeSeparators(executable)));
break; break;
@@ -181,7 +183,7 @@ GDB 32bit | Api | Api | N/A | Win32
break; break;
default: default:
appendMsgCannotInterrupt(pid, QDir::toNativeSeparators(executable) appendMsgCannotInterrupt(pid, QDir::toNativeSeparators(executable)
+ QLatin1Char(' ') + tr("could not break the process.")); + QLatin1Char(' ') + Tr::tr("could not break the process."));
break; break;
} }
} }
@@ -190,7 +192,7 @@ GDB 32bit | Api | Api | N/A | Win32
CloseHandle(inferior); CloseHandle(inferior);
#else #else
if (pid <= 0) if (pid <= 0)
appendMsgCannotInterrupt(pid, tr("Invalid process id.")); appendMsgCannotInterrupt(pid, Tr::tr("Invalid process id."));
else if (kill(pid, SIGINT)) else if (kill(pid, SIGINT))
appendMsgCannotInterrupt(pid, QString::fromLocal8Bit(strerror(errno))); appendMsgCannotInterrupt(pid, QString::fromLocal8Bit(strerror(errno)));
#endif // Q_OS_WIN #endif // Q_OS_WIN

View File

@@ -4,7 +4,8 @@
#include "devicecheckbuildstep.h" #include "devicecheckbuildstep.h"
#include "../kitinformation.h" #include "../kitinformation.h"
#include "../target.h" #include "../projectexplorertr.h"
#include "devicemanager.h" #include "devicemanager.h"
#include "idevice.h" #include "idevice.h"
#include "idevicefactory.h" #include "idevicefactory.h"
@@ -26,22 +27,22 @@ bool DeviceCheckBuildStep::init()
Utils::Id deviceTypeId = DeviceTypeKitAspect::deviceTypeId(kit()); Utils::Id deviceTypeId = DeviceTypeKitAspect::deviceTypeId(kit());
IDeviceFactory *factory = IDeviceFactory::find(deviceTypeId); IDeviceFactory *factory = IDeviceFactory::find(deviceTypeId);
if (!factory || !factory->canCreate()) { if (!factory || !factory->canCreate()) {
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage); emit addOutput(Tr::tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
return false; return false;
} }
QMessageBox msgBox(QMessageBox::Question, tr("Set Up Device"), QMessageBox msgBox(QMessageBox::Question, Tr::tr("Set Up Device"),
tr("There is no device set up for this kit. Do you want to add a device?"), Tr::tr("There is no device set up for this kit. Do you want to add a device?"),
QMessageBox::Yes|QMessageBox::No); QMessageBox::Yes|QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes); msgBox.setDefaultButton(QMessageBox::Yes);
if (msgBox.exec() == QMessageBox::No) { if (msgBox.exec() == QMessageBox::No) {
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage); emit addOutput(Tr::tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
return false; return false;
} }
IDevice::Ptr newDevice = factory->create(); IDevice::Ptr newDevice = factory->create();
if (newDevice.isNull()) { if (newDevice.isNull()) {
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage); emit addOutput(Tr::tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
return false; return false;
} }
@@ -66,5 +67,5 @@ Utils::Id DeviceCheckBuildStep::stepId()
QString DeviceCheckBuildStep::displayName() QString DeviceCheckBuildStep::displayName()
{ {
return tr("Check for a configured device"); return Tr::tr("Check for a configured device");
} }

View File

@@ -3,8 +3,8 @@
#include "devicefactoryselectiondialog.h" #include "devicefactoryselectiondialog.h"
#include "idevice.h"
#include "idevicefactory.h" #include "idevicefactory.h"
#include "../projectexplorertr.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
@@ -22,11 +22,11 @@ DeviceFactorySelectionDialog::DeviceFactorySelectionDialog(QWidget *parent) :
resize(420, 330); resize(420, 330);
m_listWidget = new QListWidget; m_listWidget = new QListWidget;
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start Wizard")); m_buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Start Wizard"));
using namespace Utils::Layouting; using namespace Utils::Layouting;
Column { Column {
tr("Available device types:"), Tr::tr("Available device types:"),
m_listWidget, m_listWidget,
m_buttonBox, m_buttonBox,
}.attachTo(this); }.attachTo(this);

View File

@@ -3,7 +3,9 @@
#include "devicefilesystemmodel.h" #include "devicefilesystemmodel.h"
#include <projectexplorer/devicesupport/idevice.h> #include "idevice.h"
#include "../projectexplorertr.h"
#include <utils/futuresynchronizer.h> #include <utils/futuresynchronizer.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/runextensions.h> #include <utils/runextensions.h>
@@ -182,9 +184,9 @@ QVariant DeviceFileSystemModel::headerData(int section, Qt::Orientation orientat
if (role != Qt::DisplayRole) if (role != Qt::DisplayRole)
return QVariant(); return QVariant();
if (section == 0) if (section == 0)
return tr("File Type"); return Tr::tr("File Type");
if (section == 1) if (section == 1)
return tr("File Name"); return Tr::tr("File Name");
return QVariant(); return QVariant();
} }

View File

@@ -4,6 +4,7 @@
#include "devicemanagermodel.h" #include "devicemanagermodel.h"
#include "devicemanager.h" #include "devicemanager.h"
#include "../projectexplorertr.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
@@ -148,7 +149,7 @@ QVariant DeviceManagerModel::data(const QModelIndex &index, int role) const
return dev->id().toSetting(); return dev->id().toSetting();
QString name; QString name;
if (d->deviceManager->defaultDevice(dev->type()) == dev) if (d->deviceManager->defaultDevice(dev->type()) == dev)
name = tr("%1 (default for %2)").arg(dev->displayName(), dev->displayType()); name = Tr::tr("%1 (default for %2)").arg(dev->displayName(), dev->displayType());
else else
name = dev->displayName(); name = dev->displayName();
return name; return name;

View File

@@ -2,10 +2,12 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "deviceprocessesdialog.h" #include "deviceprocessesdialog.h"
#include "deviceprocesslist.h" #include "deviceprocesslist.h"
#include <projectexplorer/devicesupport/idevice.h> #include "idevice.h"
#include <projectexplorer/kitchooser.h> #include "../kitchooser.h"
#include <projectexplorer/kitinformation.h> #include "../kitinformation.h"
#include "../projectexplorertr.h"
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <utils/itemviews.h> #include <utils/itemviews.h>
@@ -98,16 +100,16 @@ public:
DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, QDialog *parent) DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, QDialog *parent)
: q(parent) : q(parent)
, kitLabel(new QLabel(DeviceProcessesDialog::tr("Kit:"), parent)) , kitLabel(new QLabel(Tr::tr("Kit:"), parent))
, kitChooser(chooser) , kitChooser(chooser)
, acceptButton(nullptr) , acceptButton(nullptr)
, buttonBox(new QDialogButtonBox(parent)) , buttonBox(new QDialogButtonBox(parent))
{ {
q->setWindowTitle(DeviceProcessesDialog::tr("List of Processes")); q->setWindowTitle(Tr::tr("List of Processes"));
q->setMinimumHeight(500); q->setMinimumHeight(500);
processFilterLineEdit = new FancyLineEdit(q); processFilterLineEdit = new FancyLineEdit(q);
processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter")); processFilterLineEdit->setPlaceholderText(Tr::tr("Filter"));
processFilterLineEdit->setFocus(Qt::TabFocusReason); processFilterLineEdit->setFocus(Qt::TabFocusReason);
processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"), processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"),
true /*restoreLastItemFromHistory*/); true /*restoreLastItemFromHistory*/);
@@ -130,8 +132,8 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
errorText = new QTextBrowser(q); errorText = new QTextBrowser(q);
updateListButton = new QPushButton(DeviceProcessesDialog::tr("&Update List"), q); updateListButton = new QPushButton(Tr::tr("&Update List"), q);
killProcessButton = new QPushButton(DeviceProcessesDialog::tr("&Kill Process"), q); killProcessButton = new QPushButton(Tr::tr("&Kill Process"), q);
buttonBox->addButton(updateListButton, QDialogButtonBox::ActionRole); buttonBox->addButton(updateListButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(killProcessButton, QDialogButtonBox::ActionRole); buttonBox->addButton(killProcessButton, QDialogButtonBox::ActionRole);
@@ -139,7 +141,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
auto *leftColumn = new QFormLayout(); auto *leftColumn = new QFormLayout();
leftColumn->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); leftColumn->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
leftColumn->addRow(kitLabel, kitChooser); leftColumn->addRow(kitLabel, kitChooser);
leftColumn->addRow(DeviceProcessesDialog::tr("&Filter:"), processFilterLineEdit); leftColumn->addRow(Tr::tr("&Filter:"), processFilterLineEdit);
// QVBoxLayout *rightColumn = new QVBoxLayout(); // QVBoxLayout *rightColumn = new QVBoxLayout();
// rightColumn->addWidget(updateListButton); // rightColumn->addWidget(updateListButton);
@@ -202,7 +204,7 @@ void DeviceProcessesDialogPrivate::setDevice(const IDevice::ConstPtr &device)
void DeviceProcessesDialogPrivate::handleRemoteError(const QString &errorMsg) void DeviceProcessesDialogPrivate::handleRemoteError(const QString &errorMsg)
{ {
QMessageBox::critical(q, tr("Remote Error"), errorMsg); QMessageBox::critical(q, Tr::tr("Remote Error"), errorMsg);
updateListButton->setEnabled(true); updateListButton->setEnabled(true);
updateButtons(); updateButtons();
} }

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "deviceprocesslist.h" #include "deviceprocesslist.h"
#include "idevice.h" #include "idevice.h"
#include "../projectexplorertr.h"
#include <utils/processinfo.h> #include <utils/processinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -47,7 +49,7 @@ using namespace Internal;
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent) DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent)
: QObject(parent), d(std::make_unique<DeviceProcessListPrivate>(device)) : QObject(parent), d(std::make_unique<DeviceProcessListPrivate>(device))
{ {
d->model.setHeader({tr("Process ID"), tr("Command Line")}); d->model.setHeader({Tr::tr("Process ID"), Tr::tr("Command Line")});
} }
DeviceProcessList::~DeviceProcessList() = default; DeviceProcessList::~DeviceProcessList() = default;
@@ -60,7 +62,7 @@ void DeviceProcessList::update()
d->model.clear(); d->model.clear();
d->model.rootItem()->appendChild( d->model.rootItem()->appendChild(
new DeviceProcessTreeItem( new DeviceProcessTreeItem(
{0, tr("Fetching process list. This might take a while."), ""}, {0, Tr::tr("Fetching process list. This might take a while."), ""},
Qt::NoItemFlags)); Qt::NoItemFlags));
d->state = Listing; d->state = Listing;
doUpdate(); doUpdate();

View File

@@ -4,8 +4,8 @@
#include "devicesettingspage.h" #include "devicesettingspage.h"
#include "devicesettingswidget.h" #include "devicesettingswidget.h"
#include "../projectexplorerconstants.h"
#include <projectexplorer/projectexplorerconstants.h> #include "../projectexplorertr.h"
#include <QCoreApplication> #include <QCoreApplication>
@@ -17,7 +17,7 @@ DeviceSettingsPage::DeviceSettingsPage()
setId(Constants::DEVICE_SETTINGS_PAGE_ID); setId(Constants::DEVICE_SETTINGS_PAGE_ID);
setDisplayName(DeviceSettingsWidget::tr("Devices")); setDisplayName(DeviceSettingsWidget::tr("Devices"));
setCategory(Constants::DEVICE_SETTINGS_CATEGORY); setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("::ProjectExplorer", "Devices")); setDisplayCategory(Tr::tr("Devices"));
setCategoryIconPath(":/projectexplorer/images/settingscategory_devices.png"); setCategoryIconPath(":/projectexplorer/images/settingscategory_devices.png");
setWidgetCreator([] { return new DeviceSettingsWidget; }); setWidgetCreator([] { return new DeviceSettingsWidget; });
} }

View File

@@ -11,8 +11,8 @@
#include "idevice.h" #include "idevice.h"
#include "idevicefactory.h" #include "idevicefactory.h"
#include "idevicewidget.h" #include "idevicewidget.h"
#include <projectexplorer/projectexplorerconstants.h> #include "../projectexplorericons.h"
#include <projectexplorer/projectexplorericons.h> #include "../projectexplorertr.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -88,21 +88,21 @@ DeviceSettingsWidget::~DeviceSettingsWidget()
void DeviceSettingsWidget::initGui() void DeviceSettingsWidget::initGui()
{ {
m_configurationLabel = new QLabel(tr("&Device:")); m_configurationLabel = new QLabel(Tr::tr("&Device:"));
m_configurationComboBox = new QComboBox; m_configurationComboBox = new QComboBox;
m_configurationComboBox->setModel(m_deviceManagerModel); m_configurationComboBox->setModel(m_deviceManagerModel);
m_generalGroupBox = new QGroupBox(tr("General")); m_generalGroupBox = new QGroupBox(Tr::tr("General"));
m_nameLineEdit = new QLineEdit; m_nameLineEdit = new QLineEdit;
m_nameLineEdit->setValidator(m_nameValidator); m_nameLineEdit->setValidator(m_nameValidator);
m_osTypeValueLabel = new QLabel; m_osTypeValueLabel = new QLabel;
m_autoDetectionLabel = new QLabel; m_autoDetectionLabel = new QLabel;
m_deviceStateIconLabel = new QLabel; m_deviceStateIconLabel = new QLabel;
m_deviceStateTextLabel = new QLabel; m_deviceStateTextLabel = new QLabel;
m_osSpecificGroupBox = new QGroupBox(tr("Type Specific")); m_osSpecificGroupBox = new QGroupBox(Tr::tr("Type Specific"));
m_osSpecificGroupBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); m_osSpecificGroupBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
m_addConfigButton = new QPushButton(tr("&Add...")); m_addConfigButton = new QPushButton(Tr::tr("&Add..."));
m_removeConfigButton = new QPushButton(tr("&Remove")); m_removeConfigButton = new QPushButton(Tr::tr("&Remove"));
m_defaultDeviceButton = new QPushButton(tr("Set As Default")); m_defaultDeviceButton = new QPushButton(Tr::tr("Set As Default"));
auto line = new QFrame; auto line = new QFrame;
line->setFrameShape(QFrame::HLine); line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken); line->setFrameShadow(QFrame::Sunken);
@@ -121,10 +121,10 @@ void DeviceSettingsWidget::initGui()
}.attachTo(scrollAreaWidget); }.attachTo(scrollAreaWidget);
Form { Form {
tr("&Name:"), m_nameLineEdit, br, Tr::tr("&Name:"), m_nameLineEdit, br,
tr("Type:"), m_osTypeValueLabel, br, Tr::tr("Type:"), m_osTypeValueLabel, br,
tr("Auto-detected:"), m_autoDetectionLabel, br, Tr::tr("Auto-detected:"), m_autoDetectionLabel, br,
tr("Current state:"), Row { m_deviceStateIconLabel, m_deviceStateTextLabel, st, }, br, Tr::tr("Current state:"), Row { m_deviceStateIconLabel, m_deviceStateTextLabel, st, }, br,
}.attachTo(m_generalGroupBox); }.attachTo(m_generalGroupBox);
Row { Row {
@@ -204,7 +204,7 @@ void DeviceSettingsWidget::displayCurrent()
m_deviceManager->defaultDevice(current->type()) != current); m_deviceManager->defaultDevice(current->type()) != current);
m_osTypeValueLabel->setText(current->displayType()); m_osTypeValueLabel->setText(current->displayType());
m_autoDetectionLabel->setText(current->isAutoDetected() m_autoDetectionLabel->setText(current->isAutoDetected()
? tr("Yes (id is \"%1\")").arg(current->id().toString()) : tr("No")); ? Tr::tr("Yes (id is \"%1\")").arg(current->id().toString()) : Tr::tr("No"));
m_nameValidator->setDisplayName(current->displayName()); m_nameValidator->setDisplayName(current->displayName());
m_deviceStateIconLabel->show(); m_deviceStateIconLabel->show();
switch (current->deviceState()) { switch (current->deviceState()) {
@@ -318,14 +318,14 @@ void DeviceSettingsWidget::currentDeviceChanged(int index)
m_removeConfigButton->setEnabled(true); m_removeConfigButton->setEnabled(true);
if (device->hasDeviceTester()) { if (device->hasDeviceTester()) {
QPushButton * const button = new QPushButton(tr("Test")); QPushButton * const button = new QPushButton(Tr::tr("Test"));
m_additionalActionButtons << button; m_additionalActionButtons << button;
connect(button, &QAbstractButton::clicked, this, &DeviceSettingsWidget::testDevice); connect(button, &QAbstractButton::clicked, this, &DeviceSettingsWidget::testDevice);
m_buttonsLayout->insertWidget(m_buttonsLayout->count() - 1, button); m_buttonsLayout->insertWidget(m_buttonsLayout->count() - 1, button);
} }
if (device->canCreateProcessModel()) { if (device->canCreateProcessModel()) {
QPushButton * const button = new QPushButton(tr("Show Running Processes...")); QPushButton * const button = new QPushButton(Tr::tr("Show Running Processes..."));
m_additionalActionButtons << button; m_additionalActionButtons << button;
connect(button, &QAbstractButton::clicked, connect(button, &QAbstractButton::clicked,
this, &DeviceSettingsWidget::handleProcessListRequested); this, &DeviceSettingsWidget::handleProcessListRequested);

View File

@@ -3,6 +3,8 @@
#include "devicetestdialog.h" #include "devicetestdialog.h"
#include "../projectexplorertr.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
@@ -82,13 +84,13 @@ void DeviceTestDialog::handleErrorMessage(const QString &message)
void DeviceTestDialog::handleTestFinished(DeviceTester::TestResult result) void DeviceTestDialog::handleTestFinished(DeviceTester::TestResult result)
{ {
d->finished = true; d->finished = true;
d->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close")); d->buttonBox->button(QDialogButtonBox::Cancel)->setText(Tr::tr("Close"));
if (result == DeviceTester::TestSuccess) if (result == DeviceTester::TestSuccess)
addText(tr("Device test finished successfully."), addText(Tr::tr("Device test finished successfully."),
Utils::Theme::OutputPanes_NormalMessageTextColor, true); Utils::Theme::OutputPanes_NormalMessageTextColor, true);
else else
addText(tr("Device test failed."), Utils::Theme::OutputPanes_ErrorMessageTextColor, true); addText(Tr::tr("Device test failed."), Utils::Theme::OutputPanes_ErrorMessageTextColor, true);
} }
void DeviceTestDialog::addText(const QString &text, Utils::Theme::Color color, bool bold) void DeviceTestDialog::addText(const QString &text, Utils::Theme::Color color, bool bold)

View File

@@ -3,9 +3,10 @@
#include "deviceusedportsgatherer.h" #include "deviceusedportsgatherer.h"
#include "idevice.h"
#include "sshparameters.h" #include "sshparameters.h"
#include "../projectexplorertr.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/port.h> #include <utils/port.h>
#include <utils/portlist.h> #include <utils/portlist.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -110,7 +111,7 @@ void DeviceUsedPortsGatherer::handleProcessDone()
const QByteArray stdErr = d->process->readAllRawStandardError(); const QByteArray stdErr = d->process->readAllRawStandardError();
if (!stdErr.isEmpty()) { if (!stdErr.isEmpty()) {
errMsg += QLatin1Char('\n'); errMsg += QLatin1Char('\n');
errMsg += tr("Remote error output was: %1").arg(QString::fromUtf8(stdErr)); errMsg += Tr::tr("Remote error output was: %1").arg(QString::fromUtf8(stdErr));
} }
emitError(errMsg); emitError(errMsg);
} }
@@ -133,7 +134,7 @@ PortsGatherer::PortsGatherer(RunControl *runControl)
connect(&m_portsGatherer, &DeviceUsedPortsGatherer::error, this, &PortsGatherer::reportFailure); connect(&m_portsGatherer, &DeviceUsedPortsGatherer::error, this, &PortsGatherer::reportFailure);
connect(&m_portsGatherer, &DeviceUsedPortsGatherer::portListReady, this, [this] { connect(&m_portsGatherer, &DeviceUsedPortsGatherer::portListReady, this, [this] {
m_portList = device()->freePorts(); m_portList = device()->freePorts();
appendMessage(tr("Found %n free ports.", nullptr, m_portList.count()), NormalMessageFormat); appendMessage(Tr::tr("Found %n free ports.", nullptr, m_portList.count()), NormalMessageFormat);
reportStarted(); reportStarted();
}); });
} }
@@ -142,7 +143,7 @@ PortsGatherer::~PortsGatherer() = default;
void PortsGatherer::start() void PortsGatherer::start()
{ {
appendMessage(tr("Checking available ports..."), NormalMessageFormat); appendMessage(Tr::tr("Checking available ports..."), NormalMessageFormat);
m_portsGatherer.setDevice(device()); m_portsGatherer.setDevice(device());
m_portsGatherer.start(); m_portsGatherer.start();
} }

View File

@@ -5,6 +5,7 @@
#include "devicemanager.h" #include "devicemanager.h"
#include "idevice.h" #include "idevice.h"
#include "../projectexplorertr.h"
#include <utils/processinterface.h> #include <utils/processinterface.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -91,7 +92,7 @@ private:
void FileTransferPrivate::test() void FileTransferPrivate::test()
{ {
if (!m_testDevice) if (!m_testDevice)
return startFailed(tr("No device set for test transfer.")); return startFailed(Tr::tr("No device set for test transfer."));
run({{}, m_setup.m_method, m_setup.m_rsyncFlags}, m_testDevice); run({{}, m_setup.m_method, m_setup.m_rsyncFlags}, m_testDevice);
} }
@@ -99,7 +100,7 @@ void FileTransferPrivate::test()
void FileTransferPrivate::start() void FileTransferPrivate::start()
{ {
if (m_setup.m_files.isEmpty()) if (m_setup.m_files.isEmpty())
return startFailed(tr("No files to transfer.")); return startFailed(Tr::tr("No files to transfer."));
const FileTransferDirection direction = transferDirection(m_setup.m_files); const FileTransferDirection direction = transferDirection(m_setup.m_files);
@@ -130,7 +131,7 @@ void FileTransferPrivate::run(const FileTransferSetupData &setup, const IDeviceC
stop(); stop();
m_transfer.reset(device->createFileTransferInterface(setup)); m_transfer.reset(device->createFileTransferInterface(setup));
QTC_ASSERT(m_transfer, startFailed(tr("Missing transfer implementation.")); return); QTC_ASSERT(m_transfer, startFailed(Tr::tr("Missing transfer implementation.")); return);
m_transfer->setParent(this); m_transfer->setParent(this);
connect(m_transfer.get(), &FileTransferInterface::progress, connect(m_transfer.get(), &FileTransferInterface::progress,

View File

@@ -297,7 +297,7 @@ void IDevice::setFileAccess(DeviceFileAccess *fileAccess)
IDevice::DeviceInfo IDevice::deviceInformation() const IDevice::DeviceInfo IDevice::deviceInformation() const
{ {
const QString key = QCoreApplication::translate("ProjectExplorer::IDevice", "Device"); const QString key = Tr::tr("Device");
return DeviceInfo() << IDevice::DeviceInfoItem(key, deviceStateToString()); return DeviceInfo() << IDevice::DeviceInfoItem(key, deviceStateToString());
} }
@@ -513,13 +513,12 @@ IDevice::Ptr IDevice::clone() const
QString IDevice::deviceStateToString() const QString IDevice::deviceStateToString() const
{ {
const char context[] = "ProjectExplorer::IDevice";
switch (d->deviceState) { switch (d->deviceState) {
case IDevice::DeviceReadyToUse: return QCoreApplication::translate(context, "Ready to use"); case IDevice::DeviceReadyToUse: return Tr::tr("Ready to use");
case IDevice::DeviceConnected: return QCoreApplication::translate(context, "Connected"); case IDevice::DeviceConnected: return Tr::tr("Connected");
case IDevice::DeviceDisconnected: return QCoreApplication::translate(context, "Disconnected"); case IDevice::DeviceDisconnected: return Tr::tr("Disconnected");
case IDevice::DeviceStateUnknown: return QCoreApplication::translate(context, "Unknown"); case IDevice::DeviceStateUnknown: return Tr::tr("Unknown");
default: return QCoreApplication::translate(context, "Invalid"); default: return Tr::tr("Invalid");
} }
} }
@@ -661,14 +660,14 @@ void DeviceProcessKiller::start()
const IDevice::ConstPtr device = DeviceManager::deviceForPath(m_processPath); const IDevice::ConstPtr device = DeviceManager::deviceForPath(m_processPath);
if (!device) { if (!device) {
m_errorString = tr("No device for given path: \"%1\".").arg(m_processPath.toUserOutput()); m_errorString = Tr::tr("No device for given path: \"%1\".").arg(m_processPath.toUserOutput());
emit done(false); emit done(false);
return; return;
} }
m_signalOperation = device->signalOperation(); m_signalOperation = device->signalOperation();
if (!m_signalOperation) { if (!m_signalOperation) {
m_errorString = tr("Device for path \"%1\" does not support killing processes.") m_errorString = Tr::tr("Device for path \"%1\" does not support killing processes.")
.arg(m_processPath.toUserOutput()); .arg(m_processPath.toUserOutput());
emit done(false); emit done(false);
return; return;

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "sshdeviceprocesslist.h" #include "sshdeviceprocesslist.h"
#include "idevice.h" #include "idevice.h"
#include "../projectexplorertr.h"
#include <utils/processinfo.h> #include <utils/processinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -49,11 +51,11 @@ void SshDeviceProcessList::handleProcessDone()
reportProcessListUpdated(buildProcessList(d->m_process.cleanedStdOut())); reportProcessListUpdated(buildProcessList(d->m_process.cleanedStdOut()));
} else { } else {
const QString errorMessage = d->m_process.exitStatus() == QProcess::NormalExit const QString errorMessage = d->m_process.exitStatus() == QProcess::NormalExit
? tr("Process listing command failed with exit code %1.").arg(d->m_process.exitCode()) ? Tr::tr("Process listing command failed with exit code %1.").arg(d->m_process.exitCode())
: d->m_process.errorString(); : d->m_process.errorString();
const QString stdErr = d->m_process.cleanedStdErr(); const QString stdErr = d->m_process.cleanedStdErr();
const QString fullMessage = stdErr.isEmpty() const QString fullMessage = stdErr.isEmpty()
? errorMessage : errorMessage + '\n' + tr("Remote stderr was: %1").arg(stdErr); ? errorMessage : errorMessage + '\n' + Tr::tr("Remote stderr was: %1").arg(stdErr);
reportError(fullMessage); reportError(fullMessage);
} }
setFinished(); setFinished();
@@ -64,7 +66,7 @@ void SshDeviceProcessList::handleKillProcessFinished(const QString &errorString)
if (errorString.isEmpty()) if (errorString.isEmpty())
reportProcessKilled(); reportProcessKilled();
else else
reportError(tr("Error: Kill process failed: %1").arg(errorString)); reportError(Tr::tr("Error: Kill process failed: %1").arg(errorString));
setFinished(); setFinished();
} }

View File

@@ -2,10 +2,12 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "sshsettingspage.h" #include "sshsettingspage.h"
#include "sshsettings.h" #include "sshsettings.h"
#include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
@@ -21,8 +23,6 @@ namespace Internal {
class SshSettingsWidget : public Core::IOptionsPageWidget class SshSettingsWidget : public Core::IOptionsPageWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::SshSettingsWidget)
public: public:
SshSettingsWidget(); SshSettingsWidget();
void saveSettings(); void saveSettings();
@@ -55,9 +55,9 @@ private:
SshSettingsPage::SshSettingsPage() SshSettingsPage::SshSettingsPage()
{ {
setId(Constants::SSH_SETTINGS_PAGE_ID); setId(Constants::SSH_SETTINGS_PAGE_ID);
setDisplayName(SshSettingsWidget::tr("SSH")); setDisplayName(Tr::tr("SSH"));
setCategory(Constants::DEVICE_SETTINGS_CATEGORY); setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("::ProjectExplorer", "SSH")); setDisplayCategory(Tr::tr("SSH"));
setCategoryIconPath(":/projectexplorer/images/settingscategory_devices.png"); setCategoryIconPath(":/projectexplorer/images/settingscategory_devices.png");
setWidgetCreator([] { return new SshSettingsWidget; }); setWidgetCreator([] { return new SshSettingsWidget; });
} }
@@ -71,12 +71,12 @@ SshSettingsWidget::SshSettingsWidget()
setupAskpassPathChooser(); setupAskpassPathChooser();
setupKeygenPathChooser(); setupKeygenPathChooser();
auto * const layout = new QFormLayout(this); auto * const layout = new QFormLayout(this);
layout->addRow(tr("Enable connection sharing:"), &m_connectionSharingCheckBox); layout->addRow(Tr::tr("Enable connection sharing:"), &m_connectionSharingCheckBox);
layout->addRow(tr("Connection sharing timeout:"), &m_connectionSharingSpinBox); layout->addRow(Tr::tr("Connection sharing timeout:"), &m_connectionSharingSpinBox);
layout->addRow(tr("Path to ssh executable:"), &m_sshChooser); layout->addRow(Tr::tr("Path to ssh executable:"), &m_sshChooser);
layout->addRow(tr("Path to sftp executable:"), &m_sftpChooser); layout->addRow(Tr::tr("Path to sftp executable:"), &m_sftpChooser);
layout->addRow(tr("Path to ssh-askpass executable:"), &m_askpassChooser); layout->addRow(Tr::tr("Path to ssh-askpass executable:"), &m_askpassChooser);
layout->addRow(tr("Path to ssh-keygen executable:"), &m_keygenChooser); layout->addRow(Tr::tr("Path to ssh-keygen executable:"), &m_keygenChooser);
updateCheckboxEnabled(); updateCheckboxEnabled();
updateSpinboxEnabled(); updateSpinboxEnabled();
} }
@@ -107,7 +107,7 @@ void SshSettingsWidget::setupConnectionSharingSpinBox()
{ {
m_connectionSharingSpinBox.setMinimum(1); m_connectionSharingSpinBox.setMinimum(1);
m_connectionSharingSpinBox.setValue(SshSettings::connectionSharingTimeout()); m_connectionSharingSpinBox.setValue(SshSettings::connectionSharingTimeout());
m_connectionSharingSpinBox.setSuffix(tr(" minutes")); m_connectionSharingSpinBox.setSuffix(Tr::tr(" minutes"));
} }
void SshSettingsWidget::setupSshPathChooser() void SshSettingsWidget::setupSshPathChooser()

View File

@@ -2,14 +2,16 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "editorconfiguration.h" #include "editorconfiguration.h"
#include "project.h" #include "project.h"
#include "projectexplorer.h" #include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
@@ -22,8 +24,6 @@
#include <texteditor/marginsettings.h> #include <texteditor/marginsettings.h>
#include <texteditor/icodestylepreferencesfactory.h> #include <texteditor/icodestylepreferencesfactory.h>
#include <QLatin1String>
#include <QByteArray>
#include <QTextCodec> #include <QTextCodec>
#include <QDebug> #include <QDebug>
@@ -74,7 +74,7 @@ EditorConfiguration::EditorConfiguration() : d(std::make_unique<EditorConfigurat
// project prefs can point to the global language pool, which contains also the global language prefs // project prefs can point to the global language pool, which contains also the global language prefs
preferences->setDelegatingPool(TextEditorSettings::codeStylePool(languageId)); preferences->setDelegatingPool(TextEditorSettings::codeStylePool(languageId));
preferences->setId(languageId.name() + "Project"); preferences->setId(languageId.name() + "Project");
preferences->setDisplayName(tr("Project %1", "Settings, %1 is a language (C++ or QML)").arg(factory->displayName())); preferences->setDisplayName(Tr::tr("Project %1", "Settings, %1 is a language (C++ or QML)").arg(factory->displayName()));
// project prefs by default point to global prefs (which in turn can delegate to anything else or not) // project prefs by default point to global prefs (which in turn can delegate to anything else or not)
preferences->setCurrentDelegate(originalPreferences); preferences->setCurrentDelegate(originalPreferences);
d->m_languageCodeStylePreferences.insert(languageId, preferences); d->m_languageCodeStylePreferences.insert(languageId, preferences);
@@ -83,7 +83,7 @@ EditorConfiguration::EditorConfiguration() : d(std::make_unique<EditorConfigurat
// clone of global prefs (not language specific), for project scope // clone of global prefs (not language specific), for project scope
d->m_defaultCodeStyle = new SimpleCodeStylePreferences(this); d->m_defaultCodeStyle = new SimpleCodeStylePreferences(this);
d->m_defaultCodeStyle->setDelegatingPool(TextEditorSettings::codeStylePool()); d->m_defaultCodeStyle->setDelegatingPool(TextEditorSettings::codeStylePool());
d->m_defaultCodeStyle->setDisplayName(tr("Project", "Settings")); d->m_defaultCodeStyle->setDisplayName(Tr::tr("Project", "Settings"));
d->m_defaultCodeStyle->setId("Project"); d->m_defaultCodeStyle->setId("Project");
// if setCurrentDelegate is 0 values are read from *this prefs // if setCurrentDelegate is 0 values are read from *this prefs
d->m_defaultCodeStyle->setCurrentDelegate(TextEditorSettings::codeStyle()); d->m_defaultCodeStyle->setCurrentDelegate(TextEditorSettings::codeStyle());

View File

@@ -2,8 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "editorsettingspropertiespage.h" #include "editorsettingspropertiespage.h"
#include "editorconfiguration.h" #include "editorconfiguration.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include <texteditor/texteditorconstants.h> #include <texteditor/texteditorconstants.h>
#include <texteditor/behaviorsettings.h> #include <texteditor/behaviorsettings.h>
@@ -27,12 +29,12 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
{ {
setGlobalSettingsId(TextEditor::Constants::TEXT_EDITOR_BEHAVIOR_SETTINGS); setGlobalSettingsId(TextEditor::Constants::TEXT_EDITOR_BEHAVIOR_SETTINGS);
m_restoreButton = new QPushButton(tr("Restore Global")); m_restoreButton = new QPushButton(Tr::tr("Restore Global"));
m_displaySettings = new QGroupBox(tr("Display Settings")); m_displaySettings = new QGroupBox(Tr::tr("Display Settings"));
m_displaySettings->setEnabled(false); m_displaySettings->setEnabled(false);
m_showWrapColumn = new QCheckBox(tr("Display right &margin at column:")); m_showWrapColumn = new QCheckBox(Tr::tr("Display right &margin at column:"));
m_tintMarginArea = new QCheckBox("Colorize right margin area"); m_tintMarginArea = new QCheckBox("Colorize right margin area");
@@ -40,8 +42,8 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
m_wrapColumn->setEnabled(false); m_wrapColumn->setEnabled(false);
m_wrapColumn->setMaximum(999); m_wrapColumn->setMaximum(999);
m_useIndenter = new QCheckBox(tr("Use context-specific margin")); m_useIndenter = new QCheckBox(Tr::tr("Use context-specific margin"));
m_useIndenter->setToolTip(tr("If available, use a different margin. For example, " m_useIndenter->setToolTip(Tr::tr("If available, use a different margin. For example, "
"the ColumnLimit from the ClangFormat plugin.")); "the ColumnLimit from the ClangFormat plugin."));
m_behaviorSettings = new TextEditor::BehaviorSettingsWidget(this); m_behaviorSettings = new TextEditor::BehaviorSettingsWidget(this);

View File

@@ -4,7 +4,7 @@
#include "environmentaspect.h" #include "environmentaspect.h"
#include "environmentaspectwidget.h" #include "environmentaspectwidget.h"
#include "target.h" #include "projectexplorertr.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -22,7 +22,7 @@ namespace ProjectExplorer {
EnvironmentAspect::EnvironmentAspect() EnvironmentAspect::EnvironmentAspect()
{ {
setDisplayName(tr("Environment")); setDisplayName(Tr::tr("Environment"));
setId("EnvironmentAspect"); setId("EnvironmentAspect");
setConfigWidgetCreator([this] { return new EnvironmentAspectWidget(this); }); setConfigWidgetCreator([this] { return new EnvironmentAspectWidget(this); });
addDataExtractor(this, &EnvironmentAspect::environment, &Data::environment); addDataExtractor(this, &EnvironmentAspect::environment, &Data::environment);

View File

@@ -4,6 +4,7 @@
#include "environmentaspectwidget.h" #include "environmentaspectwidget.h"
#include "environmentwidget.h" #include "environmentwidget.h"
#include "projectexplorertr.h"
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -31,7 +32,7 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect)
auto baseEnvironmentWidget = new QWidget; auto baseEnvironmentWidget = new QWidget;
m_baseLayout = new QHBoxLayout(baseEnvironmentWidget); m_baseLayout = new QHBoxLayout(baseEnvironmentWidget);
m_baseLayout->setContentsMargins(0, 0, 0, 0); m_baseLayout->setContentsMargins(0, 0, 0, 0);
auto label = new QLabel(tr("Base environment for this run configuration:"), this); auto label = new QLabel(Tr::tr("Base environment for this run configuration:"), this);
m_baseLayout->addWidget(label); m_baseLayout->addWidget(label);
m_baseEnvironmentComboBox = new QComboBox; m_baseEnvironmentComboBox = new QComboBox;

View File

@@ -3,6 +3,8 @@
#include "environmentwidget.h" #include "environmentwidget.h"
#include "projectexplorertr.h"
#include <coreplugin/fileutils.h> #include <coreplugin/fileutils.h>
#include <coreplugin/find/itemviewfind.h> #include <coreplugin/find/itemviewfind.h>
@@ -49,16 +51,15 @@ public:
class PathListDialog : public QDialog class PathListDialog : public QDialog
{ {
Q_DECLARE_TR_FUNCTIONS(EnvironmentWidget)
public: public:
PathListDialog(const QString &varName, const QString &paths, QWidget *parent) : QDialog(parent) PathListDialog(const QString &varName, const QString &paths, QWidget *parent) : QDialog(parent)
{ {
const auto mainLayout = new QVBoxLayout(this); const auto mainLayout = new QVBoxLayout(this);
const auto viewLayout = new QHBoxLayout; const auto viewLayout = new QHBoxLayout;
const auto buttonsLayout = new QVBoxLayout; const auto buttonsLayout = new QVBoxLayout;
const auto addButton = new QPushButton(tr("Add...")); const auto addButton = new QPushButton(Tr::tr("Add..."));
const auto removeButton = new QPushButton(tr("Remove")); const auto removeButton = new QPushButton(Tr::tr("Remove"));
const auto editButton = new QPushButton(tr("Edit...")); const auto editButton = new QPushButton(Tr::tr("Edit..."));
buttonsLayout->addWidget(addButton); buttonsLayout->addWidget(addButton);
buttonsLayout->addWidget(removeButton); buttonsLayout->addWidget(removeButton);
buttonsLayout->addWidget(editButton); buttonsLayout->addWidget(editButton);
@@ -80,7 +81,7 @@ public:
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
connect(addButton, &QPushButton::clicked, this, [this] { connect(addButton, &QPushButton::clicked, this, [this] {
const FilePath dir = FileUtils::getExistingDirectory(this, tr("Choose Directory")); const FilePath dir = FileUtils::getExistingDirectory(this, Tr::tr("Choose Directory"));
if (!dir.isEmpty()) if (!dir.isEmpty())
addPath(dir.toUserOutput()); addPath(dir.toUserOutput());
}); });
@@ -139,7 +140,7 @@ public:
if (auto edit = qobject_cast<QLineEdit *>(w)) if (auto edit = qobject_cast<QLineEdit *>(w))
edit->setValidator(new Utils::NameValueValidator( edit->setValidator(new Utils::NameValueValidator(
edit, m_model, m_view, index, EnvironmentWidget::tr("Variable already exists."))); edit, m_model, m_view, index, Tr::tr("Variable already exists.")));
return w; return w;
} }
private: private:
@@ -226,24 +227,24 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, Type type, QWidget *additi
auto buttonLayout = new QVBoxLayout(); auto buttonLayout = new QVBoxLayout();
d->m_editButton = new QPushButton(this); d->m_editButton = new QPushButton(this);
d->m_editButton->setText(tr("Ed&it")); d->m_editButton->setText(Tr::tr("Ed&it"));
buttonLayout->addWidget(d->m_editButton); buttonLayout->addWidget(d->m_editButton);
d->m_addButton = new QPushButton(this); d->m_addButton = new QPushButton(this);
d->m_addButton->setText(tr("&Add")); d->m_addButton->setText(Tr::tr("&Add"));
buttonLayout->addWidget(d->m_addButton); buttonLayout->addWidget(d->m_addButton);
d->m_resetButton = new QPushButton(this); d->m_resetButton = new QPushButton(this);
d->m_resetButton->setEnabled(false); d->m_resetButton->setEnabled(false);
d->m_resetButton->setText(tr("&Reset")); d->m_resetButton->setText(Tr::tr("&Reset"));
buttonLayout->addWidget(d->m_resetButton); buttonLayout->addWidget(d->m_resetButton);
d->m_unsetButton = new QPushButton(this); d->m_unsetButton = new QPushButton(this);
d->m_unsetButton->setEnabled(false); d->m_unsetButton->setEnabled(false);
d->m_unsetButton->setText(tr("&Unset")); d->m_unsetButton->setText(Tr::tr("&Unset"));
buttonLayout->addWidget(d->m_unsetButton); buttonLayout->addWidget(d->m_unsetButton);
d->m_toggleButton = new QPushButton(tr("Disable"), this); d->m_toggleButton = new QPushButton(Tr::tr("Disable"), this);
buttonLayout->addWidget(d->m_toggleButton); buttonLayout->addWidget(d->m_toggleButton);
connect(d->m_toggleButton, &QPushButton::clicked, this, [this] { connect(d->m_toggleButton, &QPushButton::clicked, this, [this] {
d->m_model->toggleVariable(d->m_environmentView->currentIndex()); d->m_model->toggleVariable(d->m_environmentView->currentIndex());
@@ -253,11 +254,11 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, Type type, QWidget *additi
if (type == TypeLocal) { if (type == TypeLocal) {
d->m_appendPathButton = new QPushButton(this); d->m_appendPathButton = new QPushButton(this);
d->m_appendPathButton->setEnabled(false); d->m_appendPathButton->setEnabled(false);
d->m_appendPathButton->setText(tr("Append Path...")); d->m_appendPathButton->setText(Tr::tr("Append Path..."));
buttonLayout->addWidget(d->m_appendPathButton); buttonLayout->addWidget(d->m_appendPathButton);
d->m_prependPathButton = new QPushButton(this); d->m_prependPathButton = new QPushButton(this);
d->m_prependPathButton->setEnabled(false); d->m_prependPathButton->setEnabled(false);
d->m_prependPathButton->setText(tr("Prepend Path...")); d->m_prependPathButton->setText(Tr::tr("Prepend Path..."));
buttonLayout->addWidget(d->m_prependPathButton); buttonLayout->addWidget(d->m_prependPathButton);
connect(d->m_appendPathButton, &QAbstractButton::clicked, connect(d->m_appendPathButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::appendPathButtonClicked); this, &EnvironmentWidget::appendPathButtonClicked);
@@ -266,12 +267,12 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, Type type, QWidget *additi
} }
d->m_batchEditButton = new QPushButton(this); d->m_batchEditButton = new QPushButton(this);
d->m_batchEditButton->setText(tr("&Batch Edit...")); d->m_batchEditButton->setText(Tr::tr("&Batch Edit..."));
buttonLayout->addWidget(d->m_batchEditButton); buttonLayout->addWidget(d->m_batchEditButton);
d->m_terminalButton = new QPushButton(this); d->m_terminalButton = new QPushButton(this);
d->m_terminalButton->setText(tr("Open &Terminal")); d->m_terminalButton->setText(Tr::tr("Open &Terminal"));
d->m_terminalButton->setToolTip(tr("Open a terminal with this environment set up.")); d->m_terminalButton->setToolTip(Tr::tr("Open a terminal with this environment set up."));
d->m_terminalButton->setEnabled(true); d->m_terminalButton->setEnabled(true);
buttonLayout->addWidget(d->m_terminalButton); buttonLayout->addWidget(d->m_terminalButton);
buttonLayout->addStretch(); buttonLayout->addStretch();
@@ -379,19 +380,19 @@ void EnvironmentWidget::updateSummaryText()
text.append(QLatin1String("<br>")); text.append(QLatin1String("<br>"));
switch (item.operation) { switch (item.operation) {
case Utils::EnvironmentItem::Unset: case Utils::EnvironmentItem::Unset:
text.append(tr("Unset <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped())); text.append(Tr::tr("Unset <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped()));
break; break;
case Utils::EnvironmentItem::SetEnabled: case Utils::EnvironmentItem::SetEnabled:
text.append(tr("Set <a href=\"%1\"><b>%1</b></a> to <b>%2</b>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped())); text.append(Tr::tr("Set <a href=\"%1\"><b>%1</b></a> to <b>%2</b>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped()));
break; break;
case Utils::EnvironmentItem::Append: case Utils::EnvironmentItem::Append:
text.append(tr("Append <b>%2</b> to <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped())); text.append(Tr::tr("Append <b>%2</b> to <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped()));
break; break;
case Utils::EnvironmentItem::Prepend: case Utils::EnvironmentItem::Prepend:
text.append(tr("Prepend <b>%2</b> to <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped())); text.append(Tr::tr("Prepend <b>%2</b> to <a href=\"%1\"><b>%1</b></a>").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped()));
break; break;
case Utils::EnvironmentItem::SetDisabled: case Utils::EnvironmentItem::SetDisabled:
text.append(tr("Set <a href=\"%1\"><b>%1</b></a> to <b>%2</b> [disabled]").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped())); text.append(Tr::tr("Set <a href=\"%1\"><b>%1</b></a> to <b>%2</b> [disabled]").arg(item.name.toHtmlEscaped(), item.value.toHtmlEscaped()));
break; break;
} }
} }
@@ -400,14 +401,14 @@ void EnvironmentWidget::updateSummaryText()
if (text.isEmpty()) { if (text.isEmpty()) {
//: %1 is "System Environment" or some such. //: %1 is "System Environment" or some such.
if (!d->m_baseEnvironmentText.isEmpty()) if (!d->m_baseEnvironmentText.isEmpty())
text.prepend(tr("Use <b>%1</b>").arg(d->m_baseEnvironmentText)); text.prepend(Tr::tr("Use <b>%1</b>").arg(d->m_baseEnvironmentText));
else else
text.prepend(tr("<b>No environment changes</b>")); text.prepend(Tr::tr("<b>No environment changes</b>"));
} else { } else {
//: Yup, word puzzle. The Set/Unset phrases above are appended to this. //: Yup, word puzzle. The Set/Unset phrases above are appended to this.
//: %1 is "System Environment" or some such. //: %1 is "System Environment" or some such.
if (!d->m_baseEnvironmentText.isEmpty()) if (!d->m_baseEnvironmentText.isEmpty())
text.prepend(tr("Use <b>%1</b> and").arg(d->m_baseEnvironmentText)); text.prepend(Tr::tr("Use <b>%1</b> and").arg(d->m_baseEnvironmentText));
} }
d->m_detailsContainer->setSummaryText(text); d->m_detailsContainer->setSummaryText(text);
@@ -467,7 +468,7 @@ void EnvironmentWidget::unsetEnvironmentButtonClicked()
void EnvironmentWidget::amendPathList(Utils::NameValueItem::Operation op) void EnvironmentWidget::amendPathList(Utils::NameValueItem::Operation op)
{ {
const QString varName = d->m_model->indexToVariable(d->m_environmentView->currentIndex()); const QString varName = d->m_model->indexToVariable(d->m_environmentView->currentIndex());
const FilePath dir = FileUtils::getExistingDirectory(this, tr("Choose Directory")); const FilePath dir = FileUtils::getExistingDirectory(this, Tr::tr("Choose Directory"));
if (dir.isEmpty()) if (dir.isEmpty())
return; return;
Utils::NameValueItems changes = d->m_model->userChanges(); Utils::NameValueItems changes = d->m_model->userChanges();
@@ -505,13 +506,13 @@ void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &curren
d->m_resetButton->setEnabled(modified || unset); d->m_resetButton->setEnabled(modified || unset);
d->m_unsetButton->setEnabled(!unset); d->m_unsetButton->setEnabled(!unset);
d->m_toggleButton->setEnabled(!unset); d->m_toggleButton->setEnabled(!unset);
d->m_toggleButton->setText(d->m_model->isEnabled(name) ? tr("Disable") : tr("Enable")); d->m_toggleButton->setText(d->m_model->isEnabled(name) ? Tr::tr("Disable") : Tr::tr("Enable"));
} else { } else {
d->m_editButton->setEnabled(false); d->m_editButton->setEnabled(false);
d->m_resetButton->setEnabled(false); d->m_resetButton->setEnabled(false);
d->m_unsetButton->setEnabled(false); d->m_unsetButton->setEnabled(false);
d->m_toggleButton->setEnabled(false); d->m_toggleButton->setEnabled(false);
d->m_toggleButton->setText(tr("Disable")); d->m_toggleButton->setText(Tr::tr("Disable"));
} }
if (d->m_appendPathButton) { if (d->m_appendPathButton) {
const bool isPathList = d->m_model->currentEntryIsPathList(current); const bool isPathList = d->m_model->currentEntryIsPathList(current);

View File

@@ -4,6 +4,7 @@
#include "filesinallprojectsfind.h" #include "filesinallprojectsfind.h"
#include "project.h" #include "project.h"
#include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
@@ -24,7 +25,7 @@ QString FilesInAllProjectsFind::id() const
QString FilesInAllProjectsFind::displayName() const QString FilesInAllProjectsFind::displayName() const
{ {
return tr("Files in All Project Directories"); return Tr::tr("Files in All Project Directories");
} }
const char kSettingsKey[] = "FilesInAllProjectDirectories"; const char kSettingsKey[] = "FilesInAllProjectDirectories";
@@ -62,7 +63,7 @@ Utils::FileIterator *FilesInAllProjectsFind::files(const QStringList &nameFilter
QString FilesInAllProjectsFind::label() const QString FilesInAllProjectsFind::label() const
{ {
return tr("Files in All Project Directories:"); return Tr::tr("Files in All Project Directories:");
} }
} // namespace Internal } // namespace Internal

View File

@@ -4,6 +4,7 @@
#include "filterkitaspectsdialog.h" #include "filterkitaspectsdialog.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "projectexplorertr.h"
#include <utils/itemviews.h> #include <utils/itemviews.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -80,7 +81,7 @@ class FilterKitAspectsModel : public TreeModel<TreeItem, FilterTreeItem>
public: public:
FilterKitAspectsModel(const Kit *kit, QObject *parent) : TreeModel(parent) FilterKitAspectsModel(const Kit *kit, QObject *parent) : TreeModel(parent)
{ {
setHeader({FilterKitAspectsDialog::tr("Setting"), FilterKitAspectsDialog::tr("Visible")}); setHeader({Tr::tr("Setting"), Tr::tr("Visible")});
for (const KitAspect * const aspect : KitManager::kitAspects()) { for (const KitAspect * const aspect : KitManager::kitAspects()) {
if (kit && !aspect->isApplicableToKit(kit)) if (kit && !aspect->isApplicableToKit(kit))
continue; continue;

View File

@@ -8,6 +8,7 @@
#include "devicesupport/idevice.h" #include "devicesupport/idevice.h"
#include "gccparser.h" #include "gccparser.h"
#include "linuxiccparser.h" #include "linuxiccparser.h"
#include "projectexplorertr.h"
#include "projectmacro.h" #include "projectmacro.h"
#include "toolchainconfigwidget.h" #include "toolchainconfigwidget.h"
#include "toolchainmanager.h" #include "toolchainmanager.h"
@@ -304,7 +305,7 @@ static FilePath gccInstallDir(const FilePath &compiler,
GccToolChain::GccToolChain(Utils::Id typeId) : GccToolChain::GccToolChain(Utils::Id typeId) :
ToolChain(typeId) ToolChain(typeId)
{ {
setTypeDisplayName(tr("GCC")); setTypeDisplayName(Tr::tr("GCC"));
setTargetAbiKey(targetAbiKeyC); setTargetAbiKey(targetAbiKeyC);
setCompilerCommandKey("ProjectExplorer.GccToolChain.Path"); setCompilerCommandKey("ProjectExplorer.GccToolChain.Path");
} }
@@ -346,7 +347,7 @@ QString GccToolChain::defaultDisplayName() const
const Abi abi = targetAbi(); const Abi abi = targetAbi();
if (abi.architecture() == Abi::UnknownArchitecture || abi.wordWidth() == 0) if (abi.architecture() == Abi::UnknownArchitecture || abi.wordWidth() == 0)
return type; return type;
return tr("%1 (%2, %3 %4 at %5)").arg(type, return Tr::tr("%1 (%2, %3 %4 at %5)").arg(type,
ToolChainManager::displayNameOfLanguageId(language()), ToolChainManager::displayNameOfLanguageId(language()),
Abi::toString(abi.architecture()), Abi::toString(abi.architecture()),
Abi::toString(abi.wordWidth()), Abi::toString(abi.wordWidth()),
@@ -1028,7 +1029,7 @@ static Utils::FilePaths renesasRl78SearchPathsFromRegistry()
GccToolChainFactory::GccToolChainFactory() GccToolChainFactory::GccToolChainFactory()
{ {
setDisplayName(GccToolChain::tr("GCC")); setDisplayName(Tr::tr("GCC"));
setSupportedToolChainType(Constants::GCC_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::GCC_TOOLCHAIN_TYPEID);
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID}); setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
setToolchainConstructor([] { return new GccToolChain(Constants::GCC_TOOLCHAIN_TYPEID); }); setToolchainConstructor([] { return new GccToolChain(Constants::GCC_TOOLCHAIN_TYPEID); });
@@ -1277,8 +1278,8 @@ public:
const auto layout = new QHBoxLayout(this); const auto layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0); layout->setContentsMargins(0, 0, 0, 0);
m_tripleLineEdit.setEnabled(false); m_tripleLineEdit.setEnabled(false);
m_overrideCheckBox.setText(tr("Override for code model")); m_overrideCheckBox.setText(Tr::tr("Override for code model"));
m_overrideCheckBox.setToolTip(tr("Enable in the rare case that the code model\n" m_overrideCheckBox.setToolTip(Tr::tr("Enable in the rare case that the code model\n"
"fails because Clang does not understand the target architecture.")); "fails because Clang does not understand the target architecture."));
layout->addWidget(&m_tripleLineEdit, 1); layout->addWidget(&m_tripleLineEdit, 1);
layout->addWidget(&m_overrideCheckBox); layout->addWidget(&m_overrideCheckBox);
@@ -1321,15 +1322,15 @@ GccToolChainConfigWidget::GccToolChainConfigWidget(GccToolChain *tc) :
m_compilerCommand->setCommandVersionArguments(gnuVersionArgs); m_compilerCommand->setCommandVersionArguments(gnuVersionArgs);
m_compilerCommand->setHistoryCompleter("PE.Gcc.Command.History"); m_compilerCommand->setHistoryCompleter("PE.Gcc.Command.History");
m_compilerCommand->setAllowPathFromDevice(true); m_compilerCommand->setAllowPathFromDevice(true);
m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand); m_mainLayout->addRow(Tr::tr("&Compiler path:"), m_compilerCommand);
m_platformCodeGenFlagsLineEdit = new QLineEdit(this); m_platformCodeGenFlagsLineEdit = new QLineEdit(this);
m_platformCodeGenFlagsLineEdit->setText(ProcessArgs::joinArgs(tc->platformCodeGenFlags())); m_platformCodeGenFlagsLineEdit->setText(ProcessArgs::joinArgs(tc->platformCodeGenFlags()));
m_mainLayout->addRow(tr("Platform codegen flags:"), m_platformCodeGenFlagsLineEdit); m_mainLayout->addRow(Tr::tr("Platform codegen flags:"), m_platformCodeGenFlagsLineEdit);
m_platformLinkerFlagsLineEdit = new QLineEdit(this); m_platformLinkerFlagsLineEdit = new QLineEdit(this);
m_platformLinkerFlagsLineEdit->setText(ProcessArgs::joinArgs(tc->platformLinkerFlags())); m_platformLinkerFlagsLineEdit->setText(ProcessArgs::joinArgs(tc->platformLinkerFlags()));
m_mainLayout->addRow(tr("Platform linker flags:"), m_platformLinkerFlagsLineEdit); m_mainLayout->addRow(Tr::tr("Platform linker flags:"), m_platformLinkerFlagsLineEdit);
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget); m_mainLayout->addRow(Tr::tr("&ABI:"), m_abiWidget);
m_mainLayout->addRow(tr("Target triple:"), m_targetTripleWidget); m_mainLayout->addRow(Tr::tr("Target triple:"), m_targetTripleWidget);
m_abiWidget->setEnabled(false); m_abiWidget->setEnabled(false);
addErrorLabel(); addErrorLabel();
@@ -1551,7 +1552,7 @@ ClangToolChain::ClangToolChain() :
ClangToolChain::ClangToolChain(Utils::Id typeId) : ClangToolChain::ClangToolChain(Utils::Id typeId) :
GccToolChain(typeId) GccToolChain(typeId)
{ {
setTypeDisplayName(tr("Clang")); setTypeDisplayName(Tr::tr("Clang"));
syncAutodetectedWithParentToolchains(); syncAutodetectedWithParentToolchains();
} }
@@ -1743,7 +1744,7 @@ QList<OutputLineParser *> ClangToolChain::createOutputParsers() const
ClangToolChainFactory::ClangToolChainFactory() ClangToolChainFactory::ClangToolChainFactory()
{ {
setDisplayName(ClangToolChain::tr("Clang")); setDisplayName(Tr::tr("Clang"));
setSupportedToolChainType(Constants::CLANG_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::CLANG_TOOLCHAIN_TYPEID);
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID}); setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
setToolchainConstructor([] { return new ClangToolChain; }); setToolchainConstructor([] { return new ClangToolChain; });
@@ -1802,7 +1803,7 @@ ClangToolChainConfigWidget::ClangToolChainConfigWidget(ClangToolChain *tc) :
m_parentToolchainCombo = new QComboBox(this); m_parentToolchainCombo = new QComboBox(this);
m_mainLayout->insertRow(m_mainLayout->rowCount() - 1, m_mainLayout->insertRow(m_mainLayout->rowCount() - 1,
tr("Parent toolchain:"), Tr::tr("Parent toolchain:"),
m_parentToolchainCombo); m_parentToolchainCombo);
ToolChainManager *tcManager = ToolChainManager::instance(); ToolChainManager *tcManager = ToolChainManager::instance();
@@ -1914,7 +1915,7 @@ void ClangToolChainConfigWidget::makeReadOnlyImpl()
MingwToolChain::MingwToolChain() : MingwToolChain::MingwToolChain() :
GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID) GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID)
{ {
setTypeDisplayName(MingwToolChain::tr("MinGW")); setTypeDisplayName(Tr::tr("MinGW"));
} }
QStringList MingwToolChain::suggestedMkspecList() const QStringList MingwToolChain::suggestedMkspecList() const
@@ -1940,7 +1941,7 @@ FilePath MingwToolChain::makeCommand(const Environment &environment) const
MingwToolChainFactory::MingwToolChainFactory() MingwToolChainFactory::MingwToolChainFactory()
{ {
setDisplayName(MingwToolChain::tr("MinGW")); setDisplayName(Tr::tr("MinGW"));
setSupportedToolChainType(Constants::MINGW_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::MINGW_TOOLCHAIN_TYPEID);
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID}); setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
setToolchainConstructor([] { return new MingwToolChain; }); setToolchainConstructor([] { return new MingwToolChain; });
@@ -1987,7 +1988,7 @@ Toolchains MingwToolChainFactory::detectForImport(const ToolChainDescription &tc
LinuxIccToolChain::LinuxIccToolChain() : LinuxIccToolChain::LinuxIccToolChain() :
GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID) GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID)
{ {
setTypeDisplayName(LinuxIccToolChain::tr("ICC")); setTypeDisplayName(Tr::tr("ICC"));
} }
/** /**
@@ -2028,7 +2029,7 @@ QStringList LinuxIccToolChain::suggestedMkspecList() const
LinuxIccToolChainFactory::LinuxIccToolChainFactory() LinuxIccToolChainFactory::LinuxIccToolChainFactory()
{ {
setDisplayName(LinuxIccToolChain::tr("ICC")); setDisplayName(Tr::tr("ICC"));
setSupportedToolChainType(Constants::LINUXICC_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::LINUXICC_TOOLCHAIN_TYPEID);
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID}); setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
setToolchainConstructor([] { return new LinuxIccToolChain; }); setToolchainConstructor([] { return new LinuxIccToolChain; });

View File

@@ -45,8 +45,6 @@ inline const QStringList gccPredefinedMacrosOptions(Utils::Id languageId)
class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::GccToolChain)
public: public:
GccToolChain(Utils::Id typeId); GccToolChain(Utils::Id typeId);
@@ -183,8 +181,6 @@ private:
class PROJECTEXPLORER_EXPORT ClangToolChain : public GccToolChain class PROJECTEXPLORER_EXPORT ClangToolChain : public GccToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::ClangToolChain)
public: public:
ClangToolChain(); ClangToolChain();
explicit ClangToolChain(Utils::Id typeId); explicit ClangToolChain(Utils::Id typeId);
@@ -236,8 +232,6 @@ private:
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::MingwToolChain)
public: public:
Utils::FilePath makeCommand(const Utils::Environment &environment) const override; Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
@@ -256,8 +250,6 @@ private:
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::LinuxIccToolChain)
public: public:
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override; Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
QList<Utils::OutputLineParser *> createOutputParsers() const override; QList<Utils::OutputLineParser *> createOutputParsers() const override;

View File

@@ -3,6 +3,8 @@
#include "importwidget.h" #include "importwidget.h"
#include "projectexplorertr.h"
#include <utils/detailswidget.h> #include <utils/detailswidget.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
@@ -23,7 +25,7 @@ ImportWidget::ImportWidget(QWidget *parent) :
vboxLayout->setContentsMargins(0, 0, 0, 0); vboxLayout->setContentsMargins(0, 0, 0, 0);
auto detailsWidget = new Utils::DetailsWidget(this); auto detailsWidget = new Utils::DetailsWidget(this);
detailsWidget->setUseCheckBox(false); detailsWidget->setUseCheckBox(false);
detailsWidget->setSummaryText(tr("Import Build From...")); detailsWidget->setSummaryText(Tr::tr("Import Build From..."));
detailsWidget->setSummaryFontBold(true); detailsWidget->setSummaryFontBold(true);
// m_detailsWidget->setIcon(); // FIXME: Set icon! // m_detailsWidget->setIcon(); // FIXME: Set icon!
vboxLayout->addWidget(detailsWidget); vboxLayout->addWidget(detailsWidget);
@@ -35,7 +37,7 @@ ImportWidget::ImportWidget(QWidget *parent) :
m_pathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_pathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_pathChooser->setHistoryCompleter(QLatin1String("Import.SourceDir.History")); m_pathChooser->setHistoryCompleter(QLatin1String("Import.SourceDir.History"));
auto importButton = new QPushButton(tr("Import"), widget); auto importButton = new QPushButton(Tr::tr("Import"), widget);
layout->addWidget(importButton); layout->addWidget(importButton);
connect(importButton, &QAbstractButton::clicked, this, &ImportWidget::handleImportRequest); connect(importButton, &QAbstractButton::clicked, this, &ImportWidget::handleImportRequest);

View File

@@ -8,10 +8,12 @@
#include "jsonwizardfactory.h" #include "jsonwizardfactory.h"
#include "../project.h" #include "../project.h"
#include "../projectexplorertr.h"
#include "../projecttree.h" #include "../projecttree.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/locator/ilocatorfilter.h> #include <coreplugin/locator/ilocatorfilter.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
@@ -153,30 +155,25 @@ QVariant JsonFieldPage::Field::toSettings() const
JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString *errorMessage) JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString *errorMessage)
{ {
if (input.type() != QVariant::Map) { if (input.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Field is not an object.");
"Field is not an object.");
return nullptr; return nullptr;
} }
QVariantMap tmp = input.toMap(); QVariantMap tmp = input.toMap();
const QString name = consumeValue(tmp, NAME_KEY).toString(); const QString name = consumeValue(tmp, NAME_KEY).toString();
if (name.isEmpty()) { if (name.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Field has no name.");
"Field has no name.");
return nullptr; return nullptr;
} }
const QString type = consumeValue(tmp, TYPE_KEY).toString(); const QString type = consumeValue(tmp, TYPE_KEY).toString();
if (type.isEmpty()) { if (type.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Field \"%1\" has no type.").arg(name);
"Field \"%1\" has no type.").arg(name);
return nullptr; return nullptr;
} }
Field *data = createFieldData(type); Field *data = createFieldData(type);
if (!data) { if (!data) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Field \"%1\" has unsupported type \"%2\".").arg(name).arg(type);
"Field \"%1\" has unsupported type \"%2\".")
.arg(name).arg(type);
return nullptr; return nullptr;
} }
data->setTexts(name, data->setTexts(name,
@@ -193,9 +190,7 @@ JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString
QVariant dataVal = consumeValue(tmp, DATA_KEY); QVariant dataVal = consumeValue(tmp, DATA_KEY);
if (!data->parseData(dataVal, errorMessage)) { if (!data->parseData(dataVal, errorMessage)) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("When parsing Field \"%1\": %2").arg(name).arg(*errorMessage);
"When parsing Field \"%1\": %2")
.arg(name).arg(*errorMessage);
delete data; delete data;
return nullptr; return nullptr;
} }
@@ -403,9 +398,7 @@ QDebug &operator<<(QDebug &debug, const JsonFieldPage::Field &field)
bool LabelField::parseData(const QVariant &data, QString *errorMessage) bool LabelField::parseData(const QVariant &data, QString *errorMessage)
{ {
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Label (\"%1\") data is not an object.").arg(name());
"Label (\"%1\") data is not an object.")
.arg(name());
return false; return false;
} }
@@ -415,9 +408,7 @@ bool LabelField::parseData(const QVariant &data, QString *errorMessage)
m_text = JsonWizardFactory::localizedString(consumeValue(tmp, "trText")); m_text = JsonWizardFactory::localizedString(consumeValue(tmp, "trText"));
if (m_text.isEmpty()) { if (m_text.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Label (\"%1\") has no trText.").arg(name());
"Label (\"%1\") has no trText.")
.arg(name());
return false; return false;
} }
warnAboutUnsupportedKeys(tmp, name(), type()); warnAboutUnsupportedKeys(tmp, name(), type());
@@ -445,9 +436,7 @@ bool SpacerField::parseData(const QVariant &data, QString *errorMessage)
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Spacer (\"%1\") data is not an object.").arg(name());
"Spacer (\"%1\") data is not an object.")
.arg(name());
return false; return false;
} }
@@ -457,8 +446,7 @@ bool SpacerField::parseData(const QVariant &data, QString *errorMessage)
m_factor = consumeValue(tmp, "factor", 1).toInt(&ok); m_factor = consumeValue(tmp, "factor", 1).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Spacer (\"%1\") property \"factor\" is no integer value.")
"Spacer (\"%1\") property \"factor\" is no integer value.")
.arg(name()); .arg(name());
return false; return false;
} }
@@ -493,9 +481,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("LineEdit (\"%1\") data is not an object.").arg(name());
"LineEdit (\"%1\") data is not an object.")
.arg(name());
return false; return false;
} }
@@ -511,7 +497,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
if (!pattern.isEmpty()) { if (!pattern.isEmpty()) {
m_validatorRegExp = QRegularExpression('^' + pattern + '$'); m_validatorRegExp = QRegularExpression('^' + pattern + '$');
if (!m_validatorRegExp.isValid()) { if (!m_validatorRegExp.isValid()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr(
"LineEdit (\"%1\") has an invalid regular expression \"%2\" in \"validator\".") "LineEdit (\"%1\") has an invalid regular expression \"%2\" in \"validator\".")
.arg(name(), pattern); .arg(name(), pattern);
m_validatorRegExp = QRegularExpression(); m_validatorRegExp = QRegularExpression();
@@ -526,8 +512,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
} else if (completion == "namespaces") { } else if (completion == "namespaces") {
m_completion = Completion::Namespaces; m_completion = Completion::Namespaces;
} else if (!completion.isEmpty()) { } else if (!completion.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("LineEdit (\"%1\") has an invalid value \"%2\" in \"completion\".")
"LineEdit (\"%1\") has an invalid value \"%2\" in \"completion\".")
.arg(name(), completion); .arg(name(), completion);
return false; return false;
} }
@@ -704,8 +689,7 @@ bool TextEditField::parseData(const QVariant &data, QString *errorMessage)
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("TextEdit (\"%1\") data is not an object.")
"TextEdit (\"%1\") data is not an object.")
.arg(name()); .arg(name());
return false; return false;
} }
@@ -788,8 +772,7 @@ bool PathChooserField::parseData(const QVariant &data, QString *errorMessage)
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("PathChooser data is not an object.");
"PathChooser data is not an object.");
return false; return false;
} }
@@ -815,8 +798,7 @@ bool PathChooserField::parseData(const QVariant &data, QString *errorMessage)
} else if (kindStr == "any") { } else if (kindStr == "any") {
m_kind = PathChooser::Any; m_kind = PathChooser::Any;
} else { } else {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("kind \"%1\" is not one of the supported \"existingDirectory\", "
"kind \"%1\" is not one of the supported \"existingDirectory\", "
"\"directory\", \"file\", \"saveFile\", \"existingCommand\", " "\"directory\", \"file\", \"saveFile\", \"existingCommand\", "
"\"command\", \"any\".") "\"command\", \"any\".")
.arg(kindStr); .arg(kindStr);
@@ -895,9 +877,7 @@ bool CheckBoxField::parseData(const QVariant &data, QString *errorMessage)
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("CheckBox (\"%1\") data is not an object.").arg(name());
"CheckBox (\"%1\") data is not an object.")
.arg(name());
return false; return false;
} }
@@ -906,8 +886,7 @@ bool CheckBoxField::parseData(const QVariant &data, QString *errorMessage)
m_checkedValue = consumeValue(tmp, "checkedValue", true).toString(); m_checkedValue = consumeValue(tmp, "checkedValue", true).toString();
m_uncheckedValue = consumeValue(tmp, "uncheckedValue", false).toString(); m_uncheckedValue = consumeValue(tmp, "uncheckedValue", false).toString();
if (m_checkedValue == m_uncheckedValue) { if (m_checkedValue == m_uncheckedValue) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("CheckBox (\"%1\") values for checked and unchecked state are identical.")
"CheckBox (\"%1\") values for checked and unchecked state are identical.")
.arg(name()); .arg(name());
return false; return false;
} }
@@ -987,8 +966,7 @@ QVariant CheckBoxField::toSettings() const
std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &item, QString *errorMessage) std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &item, QString *errorMessage)
{ {
if (item.type() == QVariant::List) { if (item.type() == QVariant::List) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("No JSON lists allowed inside List items.");
"No JSON lists allowed inside List items.");
return {}; return {};
} }
auto standardItem = std::make_unique<QStandardItem>(); auto standardItem = std::make_unique<QStandardItem>();
@@ -998,8 +976,7 @@ std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &it
const QVariant value = consumeValue(tmp, "value", key); const QVariant value = consumeValue(tmp, "value", key);
if (key.isNull() || key.isEmpty()) { if (key.isNull() || key.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("No \"key\" found in List items.");
"No \"key\" found in List items.");
return {}; return {};
} }
standardItem->setText(key); standardItem->setText(key);
@@ -1024,9 +1001,7 @@ ListField::~ListField() = default;
bool ListField::parseData(const QVariant &data, QString *errorMessage) bool ListField::parseData(const QVariant &data, QString *errorMessage)
{ {
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("%1 (\"%2\") data is not an object.").arg(type(), name());
"%1 (\"%2\") data is not an object.")
.arg(type(), name());
return false; return false;
} }
@@ -1035,30 +1010,24 @@ bool ListField::parseData(const QVariant &data, QString *errorMessage)
bool ok; bool ok;
m_index = consumeValue(tmp, "index", 0).toInt(&ok); m_index = consumeValue(tmp, "index", 0).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("%1 (\"%2\") \"index\" is not an integer value.")
"%1 (\"%2\") \"index\" is not an integer value.")
.arg(type(), name()); .arg(type(), name());
return false; return false;
} }
m_disabledIndex = consumeValue(tmp, "disabledIndex", -1).toInt(&ok); m_disabledIndex = consumeValue(tmp, "disabledIndex", -1).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("%1 (\"%2\") \"disabledIndex\" is not an integer value.")
"%1 (\"%2\") \"disabledIndex\" is not an integer value.")
.arg(type(), name()); .arg(type(), name());
return false; return false;
} }
const QVariant value = consumeValue(tmp, "items"); const QVariant value = consumeValue(tmp, "items");
if (value.isNull()) { if (value.isNull()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("%1 (\"%2\") \"items\" missing.").arg(type(), name());
"%1 (\"%2\") \"items\" missing.")
.arg(type(), name());
return false; return false;
} }
if (value.type() != QVariant::List) { if (value.type() != QVariant::List) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("%1 (\"%2\") \"items\" is not a JSON list.").arg(type(), name());
"%1 (\"%2\") \"items\" is not a JSON list.")
.arg(type(), name());
return false; return false;
} }

View File

@@ -6,7 +6,7 @@
#include "../kit.h" #include "../kit.h"
#include "../project.h" #include "../project.h"
#include "../projectexplorer.h" #include "../projectexplorertr.h"
#include "../projectmanager.h" #include "../projectmanager.h"
#include <coreplugin/featureprovider.h> #include <coreplugin/featureprovider.h>
@@ -43,12 +43,12 @@ void JsonKitsPage::initializePage()
setTasksGenerator([required, preferred, platform](const Kit *k) -> Tasks { setTasksGenerator([required, preferred, platform](const Kit *k) -> Tasks {
if (!k->hasFeatures(required)) if (!k->hasFeatures(required))
return {CompileTask(Task::Error, tr("At least one required feature is not present."))}; return {CompileTask(Task::Error, Tr::tr("At least one required feature is not present."))};
if (!k->supportedPlatforms().contains(platform)) if (!k->supportedPlatforms().contains(platform))
return {CompileTask(Task::Unknown, tr("Platform is not supported."))}; return {CompileTask(Task::Unknown, Tr::tr("Platform is not supported."))};
if (!k->hasFeatures(preferred)) if (!k->hasFeatures(preferred))
return { return {
CompileTask(Task::Unknown, tr("At least one preferred feature is not present."))}; CompileTask(Task::Unknown, Tr::tr("At least one preferred feature is not present."))};
return {}; return {};
}); });
setProjectPath(wiz->expander()->expand(Utils::FilePath::fromString(unexpandedProjectPath()))); setProjectPath(wiz->expander()->expand(Utils::FilePath::fromString(unexpandedProjectPath())));
@@ -126,7 +126,7 @@ QVector<JsonKitsPage::ConditionalFeature> JsonKitsPage::parseFeatures(const QVar
return result; return result;
if (data.type() != QVariant::List) { if (data.type() != QVariant::List) {
if (errorMessage) if (errorMessage)
*errorMessage = tr("Feature list is set and not of type list."); *errorMessage = Tr::tr("Feature list is set and not of type list.");
return result; return result;
} }
@@ -139,7 +139,7 @@ QVector<JsonKitsPage::ConditionalFeature> JsonKitsPage::parseFeatures(const QVar
const QString feature = obj.value(QLatin1String(KEY_FEATURE)).toString(); const QString feature = obj.value(QLatin1String(KEY_FEATURE)).toString();
if (feature.isEmpty()) { if (feature.isEmpty()) {
if (errorMessage) { if (errorMessage) {
*errorMessage = tr("No \"%1\" key found in feature list object.") *errorMessage = Tr::tr("No \"%1\" key found in feature list object.")
.arg(QLatin1String(KEY_FEATURE)); .arg(QLatin1String(KEY_FEATURE));
} }
return QVector<ConditionalFeature>(); return QVector<ConditionalFeature>();
@@ -148,7 +148,7 @@ QVector<JsonKitsPage::ConditionalFeature> JsonKitsPage::parseFeatures(const QVar
result.append({ feature, obj.value(QLatin1String(KEY_CONDITION), true) }); result.append({ feature, obj.value(QLatin1String(KEY_CONDITION), true) });
} else { } else {
if (errorMessage) if (errorMessage)
*errorMessage = tr("Feature list element is not a string or object."); *errorMessage = Tr::tr("Feature list element is not a string or object.");
return QVector<ConditionalFeature>(); return QVector<ConditionalFeature>();
} }
} }

View File

@@ -2,7 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "jsonprojectpage.h" #include "jsonprojectpage.h"
#include "jsonwizard.h" #include "jsonwizard.h"
#include "../projectexplorertr.h"
#include <coreplugin/documentmanager.h> #include <coreplugin/documentmanager.h>
@@ -50,7 +52,7 @@ QString JsonProjectPage::uniqueProjectName(const QString &path)
//: File path suggestion for a new project. If you choose //: File path suggestion for a new project. If you choose
//: to translate it, make sure it is a valid path name without blanks //: to translate it, make sure it is a valid path name without blanks
//: and using only ascii chars. //: and using only ascii chars.
const QString prefix = tr("untitled"); const QString prefix = Tr::tr("untitled");
for (unsigned i = 0; ; ++i) { for (unsigned i = 0; ; ++i) {
QString name = prefix; QString name = prefix;
if (i) if (i)

View File

@@ -6,12 +6,11 @@
#include "jsonwizard.h" #include "jsonwizard.h"
#include "../project.h" #include "../project.h"
#include "../projectexplorerconstants.h" #include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include "../projectnodes.h" #include "../projectnodes.h"
#include "../projecttree.h" #include "../projecttree.h"
#include "../session.h" #include "../session.h"
#include "../projecttree.h"
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/iversioncontrol.h> #include <coreplugin/iversioncontrol.h>
@@ -152,8 +151,8 @@ void JsonSummaryPage::triggerCommit(const JsonWizard::GeneratorFiles &files)
QString errorMessage; QString errorMessage;
if (!runVersionControl(coreFiles, &errorMessage)) { if (!runVersionControl(coreFiles, &errorMessage)) {
QMessageBox::critical(wizard(), tr("Failed to Commit to Version Control"), QMessageBox::critical(wizard(), Tr::tr("Failed to Commit to Version Control"),
tr("Error message from Version Control System: \"%1\".") Tr::tr("Error message from Version Control System: \"%1\".")
.arg(errorMessage)); .arg(errorMessage));
} }
} }
@@ -169,8 +168,8 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
return; return;
if (kind == IWizardFactory::ProjectWizard) { if (kind == IWizardFactory::ProjectWizard) {
if (!static_cast<ProjectNode *>(folder)->addSubProject(generatedProject)) { if (!static_cast<ProjectNode *>(folder)->addSubProject(generatedProject)) {
QMessageBox::critical(m_wizard, tr("Failed to Add to Project"), QMessageBox::critical(m_wizard, Tr::tr("Failed to Add to Project"),
tr("Failed to add subproject \"%1\"\nto project \"%2\".") Tr::tr("Failed to add subproject \"%1\"\nto project \"%2\".")
.arg(generatedProject.toUserOutput()) .arg(generatedProject.toUserOutput())
.arg(folder->filePath().toUserOutput())); .arg(folder->filePath().toUserOutput()));
return; return;
@@ -181,8 +180,8 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
return f.file.filePath(); return f.file.filePath();
}); });
if (!folder->addFiles(filePaths)) { if (!folder->addFiles(filePaths)) {
QMessageBox::critical(wizard(), tr("Failed to Add to Project"), QMessageBox::critical(wizard(), Tr::tr("Failed to Add to Project"),
tr("Failed to add one or more files to project\n\"%1\" (%2).") Tr::tr("Failed to add one or more files to project\n\"%1\" (%2).")
.arg(folder->filePath().toUserOutput(), .arg(folder->filePath().toUserOutput(),
FilePath::formatFilePaths(filePaths, ", "))); FilePath::formatFilePaths(filePaths, ", ")));
return; return;

View File

@@ -5,11 +5,12 @@
#include "jsonwizardfactory.h" #include "jsonwizardfactory.h"
#include "jsonwizardgeneratorfactory.h" #include "jsonwizardgeneratorfactory.h"
#include "../project.h" #include "../project.h"
#include "../projectexplorer.h" #include "../projectexplorer.h"
#include "../projectexplorerconstants.h" #include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include "../projecttree.h" #include "../projecttree.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
@@ -71,7 +72,7 @@ public:
ProjectFilesModel(const QList<JsonWizard::GeneratorFile *> &candidates, QObject *parent) ProjectFilesModel(const QList<JsonWizard::GeneratorFile *> &candidates, QObject *parent)
: TreeModel(parent) : TreeModel(parent)
{ {
setHeader({QCoreApplication::translate("ProjectExplorer::JsonWizard", "Project File")}); setHeader({Tr::tr("Project File")});
for (JsonWizard::GeneratorFile * const candidate : candidates) for (JsonWizard::GeneratorFile * const candidate : candidates)
rootItem()->appendChild(new ProjectFileTreeItem(candidate)); rootItem()->appendChild(new ProjectFileTreeItem(candidate));
} }
@@ -83,8 +84,7 @@ public:
ProjectFileChooser(const QList<JsonWizard::GeneratorFile *> &candidates, QWidget *parent) ProjectFileChooser(const QList<JsonWizard::GeneratorFile *> &candidates, QWidget *parent)
: QDialog(parent), m_view(new TreeView(this)) : QDialog(parent), m_view(new TreeView(this))
{ {
setWindowTitle(QCoreApplication::translate("ProjectExplorer::JsonWizard", setWindowTitle(Tr::tr("Choose Project File"));
"Choose Project File"));
const auto model = new ProjectFilesModel(candidates, this); const auto model = new ProjectFilesModel(candidates, this);
m_view->setSelectionMode(TreeView::ExtendedSelection); m_view->setSelectionMode(TreeView::ExtendedSelection);
m_view->setSelectionBehavior(TreeView::SelectRows); m_view->setSelectionBehavior(TreeView::SelectRows);
@@ -99,7 +99,7 @@ public:
updateOkButton(); updateOkButton();
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
const auto layout = new QVBoxLayout(this); const auto layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(QCoreApplication::translate("ProjectExplorer::JsonWizard", layout->addWidget(new QLabel(Tr::tr(
"The project contains more than one project file. " "The project contains more than one project file. "
"Select the one you would like to use."))); "Select the one you would like to use.")));
layout->addWidget(m_view); layout->addWidget(m_view);
@@ -132,7 +132,7 @@ JsonWizard::JsonWizard(QWidget *parent)
*ret = stringValue(name); *ret = stringValue(name);
return !ret->isNull(); return !ret->isNull();
}); });
m_expander.registerPrefix("Exists", tr("Check whether a variable exists.<br>" m_expander.registerPrefix("Exists", Tr::tr("Check whether a variable exists.<br>"
"Returns \"true\" if it does and an empty string if not."), "Returns \"true\" if it does and an empty string if not."),
[this](const QString &value) -> QString [this](const QString &value) -> QString
{ {
@@ -171,7 +171,7 @@ JsonWizard::GeneratorFiles JsonWizard::generateFileList()
const FilePath targetPath = const FilePath targetPath =
FilePath::fromString(stringValue(QLatin1String("TargetPath"))); FilePath::fromString(stringValue(QLatin1String("TargetPath")));
if (targetPath.isEmpty()) if (targetPath.isEmpty())
errorMessage = tr("Could not determine target path. \"TargetPath\" was not set on any page."); errorMessage = Tr::tr("Could not determine target path. \"TargetPath\" was not set on any page.");
if (m_files.isEmpty() && errorMessage.isEmpty()) { if (m_files.isEmpty() && errorMessage.isEmpty()) {
emit preGenerateFiles(); emit preGenerateFiles();
@@ -188,8 +188,8 @@ JsonWizard::GeneratorFiles JsonWizard::generateFileList()
} }
if (!errorMessage.isEmpty()) { if (!errorMessage.isEmpty()) {
QMessageBox::critical(this, tr("File Generation Failed"), QMessageBox::critical(this, Tr::tr("File Generation Failed"),
tr("The wizard failed to generate files.<br>" Tr::tr("The wizard failed to generate files.<br>"
"The error message was: \"%1\".").arg(errorMessage)); "The error message was: \"%1\".").arg(errorMessage));
reject(); reject();
return GeneratorFiles(); return GeneratorFiles();
@@ -252,8 +252,7 @@ QList<JsonWizard::OptionDefinition> JsonWizard::parseOptions(const QVariant &v,
odef.m_evaluate = optionObject.value(QLatin1String("evaluate"), false); odef.m_evaluate = optionObject.value(QLatin1String("evaluate"), false);
if (odef.m_key.isEmpty()) { if (odef.m_key.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::Internal::JsonWizardFileGenerator", *errorMessage = Tr::tr("No 'key' in options object.");
"No 'key' in options object.");
result.clear(); result.clear();
break; break;
} }
@@ -341,40 +340,40 @@ void JsonWizard::accept()
JsonWizardGenerator::promptForOverwrite(&m_files, &errorMessage); JsonWizardGenerator::promptForOverwrite(&m_files, &errorMessage);
if (overwrite != JsonWizardGenerator::OverwriteOk) { if (overwrite != JsonWizardGenerator::OverwriteOk) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Overwrite Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Overwrite Files"), errorMessage);
return; return;
} }
emit preFormatFiles(m_files); emit preFormatFiles(m_files);
if (!JsonWizardGenerator::formatFiles(this, &m_files, &errorMessage)) { if (!JsonWizardGenerator::formatFiles(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Format Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Format Files"), errorMessage);
return; return;
} }
emit preWriteFiles(m_files); emit preWriteFiles(m_files);
if (!JsonWizardGenerator::writeFiles(this, &m_files, &errorMessage)) { if (!JsonWizardGenerator::writeFiles(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Write Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Write Files"), errorMessage);
return; return;
} }
emit postProcessFiles(m_files); emit postProcessFiles(m_files);
if (!JsonWizardGenerator::postWrite(this, &m_files, &errorMessage)) { if (!JsonWizardGenerator::postWrite(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Post-Process Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Post-Process Files"), errorMessage);
return; return;
} }
emit filesReady(m_files); emit filesReady(m_files);
if (!JsonWizardGenerator::polish(this, &m_files, &errorMessage)) { if (!JsonWizardGenerator::polish(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Polish Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Polish Files"), errorMessage);
return; return;
} }
emit filesPolished(m_files); emit filesPolished(m_files);
if (!JsonWizardGenerator::allDone(this, &m_files, &errorMessage)) { if (!JsonWizardGenerator::allDone(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Open Files"), errorMessage); QMessageBox::warning(this, Tr::tr("Failed to Open Files"), errorMessage);
return; return;
} }
emit allDone(m_files); emit allDone(m_files);
@@ -428,8 +427,7 @@ void JsonWizard::openFiles(const JsonWizard::GeneratorFiles &files)
for (const JsonWizard::GeneratorFile &f : files) { for (const JsonWizard::GeneratorFile &f : files) {
const Core::GeneratedFile &file = f.file; const Core::GeneratedFile &file = f.file;
if (!file.filePath().exists()) { if (!file.filePath().exists()) {
errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", errorMessage = Tr::tr("\"%1\" does not exist in the file system.")
"\"%1\" does not exist in the file system.")
.arg(file.filePath().toUserOutput()); .arg(file.filePath().toUserOutput());
break; break;
} }
@@ -439,8 +437,7 @@ void JsonWizard::openFiles(const JsonWizard::GeneratorFiles &files)
if (!result) { if (!result) {
errorMessage = result.errorMessage(); errorMessage = result.errorMessage();
if (errorMessage.isEmpty()) { if (errorMessage.isEmpty()) {
errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", errorMessage = Tr::tr("Failed to open \"%1\" as a project.")
"Failed to open \"%1\" as a project.")
.arg(file.filePath().toUserOutput()); .arg(file.filePath().toUserOutput());
} }
break; break;
@@ -452,8 +449,7 @@ void JsonWizard::openFiles(const JsonWizard::GeneratorFiles &files)
Core::IEditor *editor = Core::EditorManager::openEditor(file.filePath(), Core::IEditor *editor = Core::EditorManager::openEditor(file.filePath(),
file.editorId()); file.editorId());
if (!editor) { if (!editor) {
errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", errorMessage = Tr::tr("Failed to open an editor for \"%1\".")
"Failed to open an editor for \"%1\".")
.arg(file.filePath().toUserOutput()); .arg(file.filePath().toUserOutput());
break; break;
} else if (file.attributes() & Core::GeneratedFile::TemporaryFile) { } else if (file.attributes() & Core::GeneratedFile::TemporaryFile) {
@@ -468,15 +464,13 @@ void JsonWizard::openFiles(const JsonWizard::GeneratorFiles &files)
// Now try to find the project file and open // Now try to find the project file and open
if (!openedSomething) { if (!openedSomething) {
errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", errorMessage = Tr::tr("No file to open found in \"%1\".").arg(path);
"No file to open found in \"%1\".")
.arg(path);
} }
if (!errorMessage.isEmpty()) { if (!errorMessage.isEmpty()) {
const QString text = path.isEmpty() ? tr("Failed to open project.") const QString text = path.isEmpty() ? Tr::tr("Failed to open project.")
: tr("Failed to open project in \"%1\".").arg(path); : Tr::tr("Failed to open project in \"%1\".").arg(path);
QMessageBox msgBox(QMessageBox::Warning, tr("Cannot Open Project"), text); QMessageBox msgBox(QMessageBox::Warning, Tr::tr("Cannot Open Project"), text);
msgBox.setDetailedText(errorMessage); msgBox.setDetailedText(errorMessage);
msgBox.addButton(QMessageBox::Ok); msgBox.addButton(QMessageBox::Ok);
msgBox.exec(); msgBox.exec();
@@ -497,10 +491,9 @@ void JsonWizard::openProjectForNode(Node *node)
std::optional<FilePath> projFilePath = projNode->visibleAfterAddFileAction(); std::optional<FilePath> projFilePath = projNode->visibleAfterAddFileAction();
if (projFilePath && !Core::EditorManager::openEditor(projFilePath.value())) { if (projFilePath && !Core::EditorManager::openEditor(projFilePath.value())) {
auto errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", auto errorMessage = Tr::tr("Failed to open an editor for \"%1\".")
"Failed to open an editor for \"%1\".")
.arg(QDir::toNativeSeparators(projFilePath.value().toString())); .arg(QDir::toNativeSeparators(projFilePath.value().toString()));
QMessageBox::warning(nullptr, tr("Cannot Open Project"), errorMessage); QMessageBox::warning(nullptr, Tr::tr("Cannot Open Project"), errorMessage);
} }
} }

View File

@@ -6,8 +6,8 @@
#include "jsonwizard.h" #include "jsonwizard.h"
#include "jsonwizardgeneratorfactory.h" #include "jsonwizardgeneratorfactory.h"
#include "jsonwizardpagefactory.h" #include "jsonwizardpagefactory.h"
#include "../projectexplorerconstants.h" #include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h> #include <coreplugin/icontext.h>
@@ -103,22 +103,21 @@ static JsonWizardFactory::Generator parseGenerator(const QVariant &value, QStrin
JsonWizardFactory::Generator gen; JsonWizardFactory::Generator gen;
if (value.type() != QVariant::Map) { if (value.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", "Generator is not a object."); *errorMessage = Tr::tr("Generator is not a object.");
return gen; return gen;
} }
QVariantMap data = value.toMap(); QVariantMap data = value.toMap();
QString strVal = data.value(QLatin1String(TYPE_ID_KEY)).toString(); QString strVal = data.value(QLatin1String(TYPE_ID_KEY)).toString();
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", "Generator has no typeId set."); *errorMessage = Tr::tr("Generator has no typeId set.");
return gen; return gen;
} }
Id typeId = Id::fromString(QLatin1String(Constants::GENERATOR_ID_PREFIX) + strVal); Id typeId = Id::fromString(QLatin1String(Constants::GENERATOR_ID_PREFIX) + strVal);
JsonWizardGeneratorFactory *factory JsonWizardGeneratorFactory *factory
= findOr(s_generatorFactories, nullptr, [typeId](JsonWizardGeneratorFactory *f) { return f->canCreate(typeId); }); = findOr(s_generatorFactories, nullptr, [typeId](JsonWizardGeneratorFactory *f) { return f->canCreate(typeId); });
if (!factory) { if (!factory) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", *errorMessage = Tr::tr("TypeId \"%1\" of generator is unknown. Supported typeIds are: \"%2\".")
"TypeId \"%1\" of generator is unknown. Supported typeIds are: \"%2\".")
.arg(strVal) .arg(strVal)
.arg(supportedTypeIds(s_generatorFactories).replace(QLatin1String(Constants::GENERATOR_ID_PREFIX), QLatin1String(""))); .arg(supportedTypeIds(s_generatorFactories).replace(QLatin1String(Constants::GENERATOR_ID_PREFIX), QLatin1String("")));
return gen; return gen;
@@ -153,7 +152,7 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
FilePath dir = FilePath::fromString(path.toString()); FilePath dir = FilePath::fromString(path.toString());
if (!dir.exists()) { if (!dir.exists()) {
if (verbose()) if (verbose())
verboseLog.append(tr("Path \"%1\" does not exist when checking Json wizard search paths.\n") verboseLog.append(Tr::tr("Path \"%1\" does not exist when checking Json wizard search paths.\n")
.arg(path.toUserOutput())); .arg(path.toUserOutput()));
continue; continue;
} }
@@ -164,7 +163,7 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
while (!dirs.isEmpty()) { while (!dirs.isEmpty()) {
const FilePath current = dirs.takeFirst(); const FilePath current = dirs.takeFirst();
if (verbose()) if (verbose())
verboseLog.append(tr("Checking \"%1\" for %2.\n") verboseLog.append(Tr::tr("Checking \"%1\" for %2.\n")
.arg(QDir::toNativeSeparators(current.absolutePath().toString())) .arg(QDir::toNativeSeparators(current.absolutePath().toString()))
.arg(fileName)); .arg(fileName));
if (current.pathAppended(fileName).exists()) { if (current.pathAppended(fileName).exists()) {
@@ -186,7 +185,7 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
++column; ++column;
} }
} }
verboseLog.append(tr("* Failed to parse \"%1\":%2:%3: %4\n") verboseLog.append(Tr::tr("* Failed to parse \"%1\":%2:%3: %4\n")
.arg(configFile.fileName()) .arg(configFile.fileName())
.arg(line).arg(column) .arg(line).arg(column)
.arg(error.errorString())); .arg(error.errorString()));
@@ -194,13 +193,13 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
} }
if (!json.isObject()) { if (!json.isObject()) {
verboseLog.append(tr("* Did not find a JSON object in \"%1\".\n") verboseLog.append(Tr::tr("* Did not find a JSON object in \"%1\".\n")
.arg(configFile.fileName())); .arg(configFile.fileName()));
continue; continue;
} }
if (verbose()) if (verbose())
verboseLog.append(tr("* Configuration found and parsed.\n")); verboseLog.append(Tr::tr("* Configuration found and parsed.\n"));
return json.object().toVariantMap(); return json.object().toVariantMap();
} }
@@ -210,7 +209,7 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
dirs.swap(subDirs); dirs.swap(subDirs);
dirs.append(subDirs); dirs.append(subDirs);
} else if (verbose()) { } else if (verbose()) {
verboseLog.append(tr("JsonWizard: \"%1\" not found\n").arg(fileName)); verboseLog.append(Tr::tr("JsonWizard: \"%1\" not found\n").arg(fileName));
} }
} }
} }
@@ -306,7 +305,7 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr
JsonWizardFactory::Page p; JsonWizardFactory::Page p;
if (value.type() != QVariant::Map) { if (value.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", "Page is not an object."); *errorMessage = Tr::tr("Page is not an object.");
return p; return p;
} }
@@ -318,7 +317,7 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr
const QString strVal = getDataValue(QLatin1String(TYPE_ID_KEY), data, defaultData).toString(); const QString strVal = getDataValue(QLatin1String(TYPE_ID_KEY), data, defaultData).toString();
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", "Page has no typeId set."); *errorMessage = Tr::tr("Page has no typeId set.");
return p; return p;
} }
Id typeId = Id::fromString(QLatin1String(Constants::PAGE_ID_PREFIX) + strVal); Id typeId = Id::fromString(QLatin1String(Constants::PAGE_ID_PREFIX) + strVal);
@@ -326,8 +325,7 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr
JsonWizardPageFactory *factory JsonWizardPageFactory *factory
= Utils::findOr(s_pageFactories, nullptr, [typeId](JsonWizardPageFactory *f) { return f->canCreate(typeId); }); = Utils::findOr(s_pageFactories, nullptr, [typeId](JsonWizardPageFactory *f) { return f->canCreate(typeId); });
if (!factory) { if (!factory) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", *errorMessage = Tr::tr("TypeId \"%1\" of page is unknown. Supported typeIds are: \"%2\".")
"TypeId \"%1\" of page is unknown. Supported typeIds are: \"%2\".")
.arg(strVal) .arg(strVal)
.arg(supportedTypeIds(s_pageFactories).replace(QLatin1String(Constants::PAGE_ID_PREFIX), QLatin1String(""))); .arg(supportedTypeIds(s_pageFactories).replace(QLatin1String(Constants::PAGE_ID_PREFIX), QLatin1String("")));
return p; return p;
@@ -340,7 +338,7 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr
bool ok; bool ok;
int index = getDataValue(QLatin1String(PAGE_INDEX_KEY), data, defaultData, -1).toInt(&ok); int index = getDataValue(QLatin1String(PAGE_INDEX_KEY), data, defaultData, -1).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardFactory", "Page with typeId \"%1\" has invalid \"index\".") *errorMessage = Tr::tr("Page with typeId \"%1\" has invalid \"index\".")
.arg(typeId.toString()); .arg(typeId.toString());
return p; return p;
} }
@@ -387,7 +385,7 @@ void JsonWizardFactory::createWizardFactories()
if (!path.exists()) { if (!path.exists()) {
if (verbose()) if (verbose())
verboseLog.append(tr("Path \"%1\" does not exist when checking Json wizard search paths.\n") verboseLog.append(Tr::tr("Path \"%1\" does not exist when checking Json wizard search paths.\n")
.arg(path.toUserOutput())); .arg(path.toUserOutput()));
continue; continue;
} }
@@ -414,7 +412,7 @@ void JsonWizardFactory::createWizardFactories()
++column; ++column;
} }
} }
verboseLog.append(tr("* Failed to parse \"%1\":%2:%3: %4\n") verboseLog.append(Tr::tr("* Failed to parse \"%1\":%2:%3: %4\n")
.arg(currentFile.fileName()) .arg(currentFile.fileName())
.arg(line).arg(column) .arg(line).arg(column)
.arg(error.errorString())); .arg(error.errorString()));
@@ -422,19 +420,19 @@ void JsonWizardFactory::createWizardFactories()
} }
if (!json.isObject()) { if (!json.isObject()) {
verboseLog.append(tr("* Did not find a JSON object in \"%1\".\n") verboseLog.append(Tr::tr("* Did not find a JSON object in \"%1\".\n")
.arg(currentFile.fileName())); .arg(currentFile.fileName()));
continue; continue;
} }
if (verbose()) if (verbose())
verboseLog.append(tr("* Configuration found and parsed.\n")); verboseLog.append(Tr::tr("* Configuration found and parsed.\n"));
QVariantMap data = json.object().toVariantMap(); QVariantMap data = json.object().toVariantMap();
int version = data.value(QLatin1String(VERSION_KEY), 0).toInt(); int version = data.value(QLatin1String(VERSION_KEY), 0).toInt();
if (version < 1 || version > 1) { if (version < 1 || version > 1) {
verboseLog.append(tr("* Version %1 not supported.\n").arg(version)); verboseLog.append(Tr::tr("* Version %1 not supported.\n").arg(version));
continue; continue;
} }
@@ -649,13 +647,13 @@ QList<QVariant> JsonWizardFactory::objectOrList(const QVariant &data, QString *e
{ {
QList<QVariant> result; QList<QVariant> result;
if (data.isNull()) if (data.isNull())
*errorMessage = tr("key not found."); *errorMessage = Tr::tr("key not found.");
else if (data.type() == QVariant::Map) else if (data.type() == QVariant::Map)
result.append(data); result.append(data);
else if (data.type() == QVariant::List) else if (data.type() == QVariant::List)
result = data.toList(); result = data.toList();
else else
*errorMessage = tr("Expected an object or a list."); *errorMessage = Tr::tr("Expected an object or a list.");
return result; return result;
} }
@@ -675,7 +673,7 @@ QString JsonWizardFactory::localizedString(const QVariant &value)
} }
return QString(); return QString();
} }
return QCoreApplication::translate("ProjectExplorer::JsonWizard", value.toByteArray()); return Tr::tr(value.toByteArray());
} }
bool JsonWizardFactory::isAvailable(Id platformId) const bool JsonWizardFactory::isAvailable(Id platformId) const
@@ -685,11 +683,11 @@ bool JsonWizardFactory::isAvailable(Id platformId) const
MacroExpander expander; MacroExpander expander;
MacroExpander *e = &expander; MacroExpander *e = &expander;
expander.registerVariable("Platform", tr("The platform selected for the wizard."), expander.registerVariable("Platform", Tr::tr("The platform selected for the wizard."),
[platformId]() { return platformId.toString(); }); [platformId]() { return platformId.toString(); });
expander.registerVariable("Features", tr("The features available to this wizard."), expander.registerVariable("Features", Tr::tr("The features available to this wizard."),
[e, platformId]() { return JsonWizard::stringListToArrayString(Id::toStringList(availableFeatures(platformId)), e); }); [e, platformId]() { return JsonWizard::stringListToArrayString(Id::toStringList(availableFeatures(platformId)), e); });
expander.registerVariable("Plugins", tr("The plugins loaded."), [e]() { expander.registerVariable("Plugins", Tr::tr("The plugins loaded."), [e]() {
return JsonWizard::stringListToArrayString(Id::toStringList(pluginFeatures()), e); return JsonWizard::stringListToArrayString(Id::toStringList(pluginFeatures()), e);
}); });
Core::JsExpander jsExpander; Core::JsExpander jsExpander;
@@ -729,11 +727,11 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
&& strVal != QLatin1String("class") && strVal != QLatin1String("class")
&& strVal != QLatin1String("file") && strVal != QLatin1String("file")
&& strVal != QLatin1String("project")) { && strVal != QLatin1String("project")) {
*errorMessage = tr("\"kind\" value \"%1\" is not \"class\" (deprecated), \"file\" or \"project\".").arg(strVal); *errorMessage = Tr::tr("\"kind\" value \"%1\" is not \"class\" (deprecated), \"file\" or \"project\".").arg(strVal);
return false; return false;
} }
if ((strVal == QLatin1String("file") || strVal == QLatin1String("class")) && !projectTypes.isEmpty()) { if ((strVal == QLatin1String("file") || strVal == QLatin1String("class")) && !projectTypes.isEmpty()) {
*errorMessage = tr("\"kind\" is \"file\" or \"class\" (deprecated) and \"%1\" is also set.").arg(QLatin1String(SUPPORTED_PROJECTS)); *errorMessage = Tr::tr("\"kind\" is \"file\" or \"class\" (deprecated) and \"%1\" is also set.").arg(QLatin1String(SUPPORTED_PROJECTS));
return false; return false;
} }
if (strVal == QLatin1String("project") && projectTypes.isEmpty()) if (strVal == QLatin1String("project") && projectTypes.isEmpty())
@@ -743,14 +741,14 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
strVal = data.value(QLatin1String(ID_KEY)).toString(); strVal = data.value(QLatin1String(ID_KEY)).toString();
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = tr("No id set."); *errorMessage = Tr::tr("No id set.");
return false; return false;
} }
setId(Id::fromString(strVal)); setId(Id::fromString(strVal));
strVal = data.value(QLatin1String(CATEGORY_KEY)).toString(); strVal = data.value(QLatin1String(CATEGORY_KEY)).toString();
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = tr("No category is set."); *errorMessage = Tr::tr("No category is set.");
return false; return false;
} }
setCategory(strVal); setCategory(strVal);
@@ -760,7 +758,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
strVal = data.value(QLatin1String(ICON_KEY)).toString(); strVal = data.value(QLatin1String(ICON_KEY)).toString();
iconPath = baseDir.resolvePath(strVal); iconPath = baseDir.resolvePath(strVal);
if (!iconPath.exists()) { if (!iconPath.exists()) {
*errorMessage = tr("Icon file \"%1\" not found.").arg(iconPath.toUserOutput()); *errorMessage = Tr::tr("Icon file \"%1\" not found.").arg(iconPath.toUserOutput());
return false; return false;
} }
} }
@@ -780,7 +778,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
if (!strVal.isEmpty()) { if (!strVal.isEmpty()) {
const FilePath imagePath = baseDir.resolvePath(strVal); const FilePath imagePath = baseDir.resolvePath(strVal);
if (!imagePath.exists()) { if (!imagePath.exists()) {
*errorMessage = tr("Image file \"%1\" not found.").arg(imagePath.toUserOutput()); *errorMessage = Tr::tr("Image file \"%1\" not found.").arg(imagePath.toUserOutput());
return false; return false;
} }
setDescriptionImage(imagePath.toString()); setDescriptionImage(imagePath.toString());
@@ -796,21 +794,21 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
strVal = localizedString(data.value(QLatin1String(DISPLAY_NAME_KEY))); strVal = localizedString(data.value(QLatin1String(DISPLAY_NAME_KEY)));
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = tr("No displayName set."); *errorMessage = Tr::tr("No displayName set.");
return false; return false;
} }
setDisplayName(strVal); setDisplayName(strVal);
strVal = localizedString(data.value(QLatin1String(CATEGORY_NAME_KEY))); strVal = localizedString(data.value(QLatin1String(CATEGORY_NAME_KEY)));
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = tr("No displayCategory set."); *errorMessage = Tr::tr("No displayCategory set.");
return false; return false;
} }
setDisplayCategory(strVal); setDisplayCategory(strVal);
strVal = localizedString(data.value(QLatin1String(DESCRIPTION_KEY))); strVal = localizedString(data.value(QLatin1String(DESCRIPTION_KEY)));
if (strVal.isEmpty()) { if (strVal.isEmpty()) {
*errorMessage = tr("No description set."); *errorMessage = Tr::tr("No description set.");
return false; return false;
} }
setDescription(strVal); setDescription(strVal);
@@ -818,7 +816,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
// Generator: // Generator:
QVariantList list = objectOrList(data.value(QLatin1String(GENERATOR_KEY)), errorMessage); QVariantList list = objectOrList(data.value(QLatin1String(GENERATOR_KEY)), errorMessage);
if (!errorMessage->isEmpty()) { if (!errorMessage->isEmpty()) {
*errorMessage = tr("When parsing \"generators\": %1").arg(*errorMessage); *errorMessage = Tr::tr("When parsing \"generators\": %1").arg(*errorMessage);
return false; return false;
} }
@@ -833,7 +831,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
// Pages: // Pages:
list = objectOrList(data.value(QLatin1String(PAGES_KEY)), errorMessage); list = objectOrList(data.value(QLatin1String(PAGES_KEY)), errorMessage);
if (!errorMessage->isEmpty()) { if (!errorMessage->isEmpty()) {
*errorMessage = tr("When parsing \"pages\": %1").arg(*errorMessage); *errorMessage = Tr::tr("When parsing \"pages\": %1").arg(*errorMessage);
return false; return false;
} }

View File

@@ -3,7 +3,7 @@
#include "jsonwizardfilegenerator.h" #include "jsonwizardfilegenerator.h"
#include "../projectexplorer.h" #include "../projectexplorertr.h"
#include "jsonwizard.h" #include "jsonwizard.h"
#include "jsonwizardfactory.h" #include "jsonwizardfactory.h"
@@ -33,8 +33,7 @@ bool JsonWizardFileGenerator::setup(const QVariant &data, QString *errorMessage)
for (const QVariant &d : list) { for (const QVariant &d : list) {
if (d.type() != QVariant::Map) { if (d.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Files data list entry is not an object.");
"Files data list entry is not an object.");
return false; return false;
} }
@@ -55,8 +54,7 @@ bool JsonWizardFileGenerator::setup(const QVariant &data, QString *errorMessage)
return false; return false;
if (f.source.isEmpty() && f.target.isEmpty()) { if (f.source.isEmpty() && f.target.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = Tr::tr("Source and target are both empty.");
"Source and target are both empty.");
return false; return false;
} }

View File

@@ -10,8 +10,10 @@
#include "../editorconfiguration.h" #include "../editorconfiguration.h"
#include "../project.h" #include "../project.h"
#include "../projectexplorerconstants.h" #include "../projectexplorerconstants.h"
#include "../projectexplorertr.h"
#include <coreplugin/dialogs/promptoverwritedialog.h> #include <coreplugin/dialogs/promptoverwritedialog.h>
#include <texteditor/icodestylepreferences.h> #include <texteditor/icodestylepreferences.h>
#include <texteditor/icodestylepreferencesfactory.h> #include <texteditor/icodestylepreferencesfactory.h>
#include <texteditor/storagesettings.h> #include <texteditor/storagesettings.h>
@@ -25,7 +27,6 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <QCoreApplication>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
@@ -162,23 +163,19 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
const QString namePart = filePath.toUserOutput().mid(commonPathSize); const QString namePart = filePath.toUserOutput().mid(commonPathSize);
if (filePath.isDir()) { if (filePath.isDir()) {
oddStuffFound = true; oddStuffFound = true;
fileNamesMsgPart += QCoreApplication::translate("ProjectExplorer::JsonWizardGenerator", "%1 [folder]") fileNamesMsgPart += Tr::tr("%1 [folder]").arg(namePart);
.arg(namePart);
} else if (filePath.isSymLink()) { } else if (filePath.isSymLink()) {
oddStuffFound = true; oddStuffFound = true;
fileNamesMsgPart += QCoreApplication::translate("ProjectExplorer::JsonWizardGenerator", "%1 [symbolic link]") fileNamesMsgPart += Tr::tr("%1 [symbolic link]").arg(namePart);
.arg(namePart);
} else if (!filePath.isWritableDir() && !filePath.isWritableFile()) { } else if (!filePath.isWritableDir() && !filePath.isWritableFile()) {
oddStuffFound = true; oddStuffFound = true;
fileNamesMsgPart += QCoreApplication::translate("ProjectExplorer::JsonWizardGenerator", "%1 [read only]") fileNamesMsgPart += Tr::tr("%1 [read only]").arg(namePart);
.arg(namePart);
} }
} }
} }
if (oddStuffFound) { if (oddStuffFound) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizardGenerator", *errorMessage = Tr::tr("The directory %1 contains files which cannot be overwritten:\n%2.")
"The directory %1 contains files which cannot be overwritten:\n%2.")
.arg(commonExistingPath).arg(fileNamesMsgPart); .arg(commonExistingPath).arg(fileNamesMsgPart);
return OverwriteError; return OverwriteError;
} }

View File

@@ -10,11 +10,11 @@
#include "jsonprojectpage.h" #include "jsonprojectpage.h"
#include "jsonsummarypage.h" #include "jsonsummarypage.h"
#include "jsonwizardfactory.h" #include "jsonwizardfactory.h"
#include "../projectexplorertr.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/wizardpage.h> #include <utils/wizardpage.h>
#include <QCoreApplication>
#include <QVariant> #include <QVariant>
namespace ProjectExplorer { namespace ProjectExplorer {
@@ -60,8 +60,7 @@ bool FieldPageFactory::validateData(Utils::Id typeId, const QVariant &data, QStr
const QList<QVariant> list = JsonWizardFactory::objectOrList(data, errorMessage); const QList<QVariant> list = JsonWizardFactory::objectOrList(data, errorMessage);
if (list.isEmpty()) { if (list.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("When parsing fields of page \"%1\": %2")
"When parsing fields of page \"%1\": %2")
.arg(typeId.toString()).arg(*errorMessage); .arg(typeId.toString()).arg(*errorMessage);
return false; return false;
} }
@@ -98,8 +97,7 @@ bool FilePageFactory::validateData(Utils::Id typeId, const QVariant &data, QStri
{ {
QTC_ASSERT(canCreate(typeId), return false); QTC_ASSERT(canCreate(typeId), return false);
if (!data.isNull() && (data.type() != QVariant::Map || !data.toMap().isEmpty())) { if (!data.isNull() && (data.type() != QVariant::Map || !data.toMap().isEmpty())) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("\"data\" for a \"File\" page needs to be unset or an empty object.");
"\"data\" for a \"File\" page needs to be unset or an empty object.");
return false; return false;
} }
@@ -110,9 +108,9 @@ bool FilePageFactory::validateData(Utils::Id typeId, const QVariant &data, QStri
// KitsPageFactory: // KitsPageFactory:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
static const char KEY_PROJECT_FILE[] = "projectFilePath"; const char KEY_PROJECT_FILE[] = "projectFilePath";
static const char KEY_REQUIRED_FEATURES[] = "requiredFeatures"; const char KEY_REQUIRED_FEATURES[] = "requiredFeatures";
static const char KEY_PREFERRED_FEATURES[] = "preferredFeatures"; const char KEY_PREFERRED_FEATURES[] = "preferredFeatures";
KitsPageFactory::KitsPageFactory() KitsPageFactory::KitsPageFactory()
{ {
@@ -138,8 +136,7 @@ static bool validateFeatureList(const QVariantMap &data, const QByteArray &key,
QString message; QString message;
JsonKitsPage::parseFeatures(data.value(QLatin1String(key)), &message); JsonKitsPage::parseFeatures(data.value(QLatin1String(key)), &message);
if (!message.isEmpty()) { if (!message.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("Error parsing \"%1\" in \"Kits\" page: %2")
"Error parsing \"%1\" in \"Kits\" page: %2")
.arg(QLatin1String(key), message); .arg(QLatin1String(key), message);
return false; return false;
} }
@@ -151,15 +148,13 @@ bool KitsPageFactory::validateData(Utils::Id typeId, const QVariant &data, QStri
QTC_ASSERT(canCreate(typeId), return false); QTC_ASSERT(canCreate(typeId), return false);
if (data.isNull() || data.type() != QVariant::Map) { if (data.isNull() || data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("\"data\" must be a JSON object for \"Kits\" pages.");
"\"data\" must be a JSON object for \"Kits\" pages.");
return false; return false;
} }
QVariantMap tmp = data.toMap(); QVariantMap tmp = data.toMap();
if (tmp.value(QLatin1String(KEY_PROJECT_FILE)).toString().isEmpty()) { if (tmp.value(QLatin1String(KEY_PROJECT_FILE)).toString().isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("\"Kits\" page requires a \"%1\" set.")
"\"Kits\" page requires a \"%1\" set.")
.arg(QLatin1String(KEY_PROJECT_FILE)); .arg(QLatin1String(KEY_PROJECT_FILE));
return false; return false;
} }
@@ -212,8 +207,7 @@ bool ProjectPageFactory::validateData(Utils::Id typeId, const QVariant &data, QS
QTC_ASSERT(canCreate(typeId), return false); QTC_ASSERT(canCreate(typeId), return false);
if (!data.isNull() && data.type() != QVariant::Map) { if (!data.isNull() && data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("\"data\" must be empty or a JSON object for \"Project\" pages.");
"\"data\" must be empty or a JSON object for \"Project\" pages.");
return false; return false;
} }
QVariantMap tmp = data.toMap(); QVariantMap tmp = data.toMap();
@@ -222,7 +216,7 @@ bool ProjectPageFactory::validateData(Utils::Id typeId, const QVariant &data, QS
if (!projectNameValidator.isNull()) { if (!projectNameValidator.isNull()) {
QRegularExpression regularExpression(projectNameValidator); QRegularExpression regularExpression(projectNameValidator);
if (!regularExpression.isValid()) { if (!regularExpression.isValid()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr(
"Invalid regular expression \"%1\" in \"%2\". %3").arg( "Invalid regular expression \"%1\" in \"%2\". %3").arg(
projectNameValidator, QLatin1String(KEY_PROJECT_NAME_VALIDATOR), regularExpression.errorString()); projectNameValidator, QLatin1String(KEY_PROJECT_NAME_VALIDATOR), regularExpression.errorString());
return false; return false;
@@ -259,8 +253,7 @@ bool SummaryPageFactory::validateData(Utils::Id typeId, const QVariant &data, QS
{ {
QTC_ASSERT(canCreate(typeId), return false); QTC_ASSERT(canCreate(typeId), return false);
if (!data.isNull() && (data.type() != QVariant::Map)) { if (!data.isNull() && (data.type() != QVariant::Map)) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", *errorMessage = Tr::tr("\"data\" for a \"Summary\" page can be unset or needs to be an object.");
"\"data\" for a \"Summary\" page can be unset or needs to be an object.");
return false; return false;
} }

View File

@@ -4,6 +4,7 @@
#include "jsonwizardscannergenerator.h" #include "jsonwizardscannergenerator.h"
#include "../projectmanager.h" #include "../projectmanager.h"
#include "../projectexplorertr.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
@@ -13,7 +14,6 @@
#include <utils/mimeutils.h> #include <utils/mimeutils.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QCoreApplication>
#include <QDir> #include <QDir>
#include <QVariant> #include <QVariant>
@@ -28,8 +28,7 @@ bool JsonWizardScannerGenerator::setup(const QVariant &data, QString *errorMessa
return true; return true;
if (data.type() != QVariant::Map) { if (data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::Internal::JsonWizard", *errorMessage = Tr::tr("Key is not an object.");
"Key is not an object.");
return false; return false;
} }
@@ -40,8 +39,7 @@ bool JsonWizardScannerGenerator::setup(const QVariant &data, QString *errorMessa
for (const QString &pattern : patterns) { for (const QString &pattern : patterns) {
QRegularExpression regexp(pattern); QRegularExpression regexp(pattern);
if (!regexp.isValid()) { if (!regexp.isValid()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::Internal::JsonWizard", *errorMessage = Tr::tr("Pattern \"%1\" is no valid regular expression.");
"Pattern \"%1\" is no valid regular expression.");
return false; return false;
} }
m_subDirectoryExpressions << regexp; m_subDirectoryExpressions << regexp;
@@ -64,8 +62,7 @@ Core::GeneratedFiles JsonWizardScannerGenerator::fileList(Utils::MacroExpander *
if (!m_binaryPattern.isEmpty()) { if (!m_binaryPattern.isEmpty()) {
binaryPattern = QRegularExpression(expander->expand(m_binaryPattern)); binaryPattern = QRegularExpression(expander->expand(m_binaryPattern));
if (!binaryPattern.isValid()) { if (!binaryPattern.isValid()) {
qWarning() << QCoreApplication::translate("ProjectExplorer::Internal::JsonWizard", qWarning() << Tr::tr("ScannerGenerator: Binary pattern \"%1\" not valid.")
"ScannerGenerator: Binary pattern \"%1\" not valid.")
.arg(m_binaryPattern); .arg(m_binaryPattern);
return result; return result;
} }

View File

@@ -10,6 +10,7 @@
#include "ioutputparser.h" #include "ioutputparser.h"
#include "osparser.h" #include "osparser.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/displayname.h> #include <utils/displayname.h>
@@ -53,8 +54,6 @@ namespace Internal {
class KitPrivate class KitPrivate
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Kit)
public: public:
KitPrivate(Id id, Kit *kit) : KitPrivate(Id id, Kit *kit) :
m_id(id) m_id(id)
@@ -62,28 +61,27 @@ public:
if (!id.isValid()) if (!id.isValid())
m_id = Id::fromString(QUuid::createUuid().toString()); m_id = Id::fromString(QUuid::createUuid().toString());
m_unexpandedDisplayName.setDefaultValue(QCoreApplication::translate("ProjectExplorer::Kit", m_unexpandedDisplayName.setDefaultValue(Tr::tr("Unnamed"));
"Unnamed"));
m_macroExpander.setDisplayName(tr("Kit")); m_macroExpander.setDisplayName(Tr::tr("Kit"));
m_macroExpander.setAccumulating(true); m_macroExpander.setAccumulating(true);
m_macroExpander.registerVariable("Kit:Id", tr("Kit ID"), m_macroExpander.registerVariable("Kit:Id", Tr::tr("Kit ID"),
[kit] { return kit->id().toString(); }); [kit] { return kit->id().toString(); });
m_macroExpander.registerVariable("Kit:FileSystemName", tr("Kit filesystem-friendly name"), m_macroExpander.registerVariable("Kit:FileSystemName", Tr::tr("Kit filesystem-friendly name"),
[kit] { return kit->fileSystemFriendlyName(); }); [kit] { return kit->fileSystemFriendlyName(); });
for (KitAspect *aspect : KitManager::kitAspects()) for (KitAspect *aspect : KitManager::kitAspects())
aspect->addToMacroExpander(kit, &m_macroExpander); aspect->addToMacroExpander(kit, &m_macroExpander);
m_macroExpander.registerVariable("Kit:Name", m_macroExpander.registerVariable("Kit:Name",
tr("The name of the kit."), Tr::tr("The name of the kit."),
[kit] { return kit->displayName(); }); [kit] { return kit->displayName(); });
m_macroExpander.registerVariable("Kit:FileSystemName", m_macroExpander.registerVariable("Kit:FileSystemName",
tr("The name of the kit in a filesystem-friendly version."), Tr::tr("The name of the kit in a filesystem-friendly version."),
[kit] { return kit->fileSystemFriendlyName(); }); [kit] { return kit->fileSystemFriendlyName(); });
m_macroExpander.registerVariable("Kit:Id", m_macroExpander.registerVariable("Kit:Id",
tr("The ID of the kit."), Tr::tr("The ID of the kit."),
[kit] { return kit->id().toString(); }); [kit] { return kit->id().toString(); });
} }
@@ -715,8 +713,8 @@ QString Kit::newKitName(const QList<Kit *> &allKits) const
QString Kit::newKitName(const QString &name, const QList<Kit *> &allKits) QString Kit::newKitName(const QString &name, const QList<Kit *> &allKits)
{ {
const QString baseName = name.isEmpty() const QString baseName = name.isEmpty()
? QCoreApplication::translate("ProjectExplorer::Kit", "Unnamed") ? Tr::tr("Unnamed")
: QCoreApplication::translate("ProjectExplorer::Kit", "Clone of %1").arg(name); : Tr::tr("Clone of %1").arg(name);
return Utils::makeUniquelyNumbered(baseName, transform(allKits, &Kit::unexpandedDisplayName)); return Utils::makeUniquelyNumbered(baseName, transform(allKits, &Kit::unexpandedDisplayName));
} }

View File

@@ -3,10 +3,9 @@
#include "kitchooser.h" #include "kitchooser.h"
#include "kitinformation.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "project.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "session.h" #include "session.h"
#include "target.h" #include "target.h"
@@ -92,7 +91,7 @@ void KitChooser::populate()
if (Target *target = SessionManager::startupTarget()) { if (Target *target = SessionManager::startupTarget()) {
Kit *kit = target->kit(); Kit *kit = target->kit();
if (m_kitPredicate(kit)) { if (m_kitPredicate(kit)) {
QString display = tr("Kit of Active Project: %1").arg(kitText(kit)); QString display = Tr::tr("Kit of Active Project: %1").arg(kitText(kit));
m_chooser->addItem(display, kit->id().toSetting()); m_chooser->addItem(display, kit->id().toSetting());
m_chooser->setItemData(0, kitToolTip(kit), Qt::ToolTipRole); m_chooser->setItemData(0, kitToolTip(kit), Qt::ToolTipRole);
if (!lastKit.isValid()) { if (!lastKit.isValid()) {

View File

@@ -9,6 +9,7 @@
#include "devicesupport/idevicefactory.h" #include "devicesupport/idevicefactory.h"
#include "devicesupport/sshparameters.h" #include "devicesupport/sshparameters.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "kit.h" #include "kit.h"
#include "toolchain.h" #include "toolchain.h"
#include "toolchainmanager.h" #include "toolchainmanager.h"
@@ -47,8 +48,6 @@ const char KITINFORMATION_ID_V3[] = "PE.Profile.ToolChainsV3";
namespace Internal { namespace Internal {
class SysRootKitAspectWidget : public KitAspectWidget class SysRootKitAspectWidget : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::SysRootKitAspect)
public: public:
SysRootKitAspectWidget(Kit *k, const KitAspect *ki) : KitAspectWidget(k, ki) SysRootKitAspectWidget(Kit *k, const KitAspect *ki) : KitAspectWidget(k, ki)
{ {
@@ -92,8 +91,8 @@ SysRootKitAspect::SysRootKitAspect()
{ {
setObjectName(QLatin1String("SysRootInformation")); setObjectName(QLatin1String("SysRootInformation"));
setId(SysRootKitAspect::id()); setId(SysRootKitAspect::id());
setDisplayName(tr("Sysroot")); setDisplayName(Tr::tr("Sysroot"));
setDescription(tr("The root directory of the system image to use.<br>" setDescription(Tr::tr("The root directory of the system image to use.<br>"
"Leave empty when building for the desktop.")); "Leave empty when building for the desktop."));
setPriority(31000); setPriority(31000);
} }
@@ -110,13 +109,13 @@ Tasks SysRootKitAspect::validate(const Kit *k) const
if (!dir.exists()) { if (!dir.exists()) {
result << BuildSystemTask(Task::Warning, result << BuildSystemTask(Task::Warning,
tr("Sys Root \"%1\" does not exist in the file system.").arg(dir.toUserOutput())); Tr::tr("Sys Root \"%1\" does not exist in the file system.").arg(dir.toUserOutput()));
} else if (!dir.isDir()) { } else if (!dir.isDir()) {
result << BuildSystemTask(Task::Warning, result << BuildSystemTask(Task::Warning,
tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput())); Tr::tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()));
} else if (dir.dirEntries(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()) { } else if (dir.dirEntries(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()) {
result << BuildSystemTask(Task::Warning, result << BuildSystemTask(Task::Warning,
tr("Sys Root \"%1\" is empty.").arg(dir.toUserOutput())); Tr::tr("Sys Root \"%1\" is empty.").arg(dir.toUserOutput()));
} }
return result; return result;
} }
@@ -130,14 +129,14 @@ KitAspectWidget *SysRootKitAspect::createConfigWidget(Kit *k) const
KitAspect::ItemList SysRootKitAspect::toUserOutput(const Kit *k) const KitAspect::ItemList SysRootKitAspect::toUserOutput(const Kit *k) const
{ {
return {{tr("Sys Root"), sysRoot(k).toUserOutput()}}; return {{Tr::tr("Sys Root"), sysRoot(k).toUserOutput()}};
} }
void SysRootKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const void SysRootKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{ {
QTC_ASSERT(kit, return); QTC_ASSERT(kit, return);
expander->registerFileVariables("SysRoot", tr("Sys Root"), [kit] { expander->registerFileVariables("SysRoot", Tr::tr("Sys Root"), [kit] {
return SysRootKitAspect::sysRoot(kit); return SysRootKitAspect::sysRoot(kit);
}); });
} }
@@ -188,8 +187,6 @@ void SysRootKitAspect::setSysRoot(Kit *k, const FilePath &v)
namespace Internal { namespace Internal {
class ToolChainKitAspectWidget final : public KitAspectWidget class ToolChainKitAspectWidget final : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::ToolChainKitAspect)
public: public:
ToolChainKitAspectWidget(Kit *k, const KitAspect *ki) : KitAspectWidget(k, ki) ToolChainKitAspectWidget(Kit *k, const KitAspect *ki) : KitAspectWidget(k, ki)
{ {
@@ -249,7 +246,7 @@ private:
QComboBox *cb = m_languageComboboxMap.value(l); QComboBox *cb = m_languageComboboxMap.value(l);
cb->clear(); cb->clear();
cb->addItem(tr("<No compiler>"), QByteArray()); cb->addItem(Tr::tr("<No compiler>"), QByteArray());
for (ToolChain *tc : ltcList) for (ToolChain *tc : ltcList)
cb->addItem(tc->displayName(), tc->id()); cb->addItem(tc->displayName(), tc->id());
@@ -305,8 +302,8 @@ ToolChainKitAspect::ToolChainKitAspect()
{ {
setObjectName(QLatin1String("ToolChainInformation")); setObjectName(QLatin1String("ToolChainInformation"));
setId(ToolChainKitAspect::id()); setId(ToolChainKitAspect::id());
setDisplayName(tr("Compiler")); setDisplayName(Tr::tr("Compiler"));
setDescription(tr("The compiler to use for building.<br>" setDescription(Tr::tr("The compiler to use for building.<br>"
"Make sure the compiler will produce binaries compatible " "Make sure the compiler will produce binaries compatible "
"with the target device, Qt version and other libraries used.")); "with the target device, Qt version and other libraries used."));
setPriority(30000); setPriority(30000);
@@ -355,7 +352,7 @@ Tasks ToolChainKitAspect::validate(const Kit *k) const
} }
if (targetAbis.count() != 1) { if (targetAbis.count() != 1) {
result << BuildSystemTask(Task::Error, result << BuildSystemTask(Task::Error,
tr("Compilers produce code for different ABIs: %1") Tr::tr("Compilers produce code for different ABIs: %1")
.arg(Utils::transform<QList>(targetAbis, &Abi::toString).join(", "))); .arg(Utils::transform<QList>(targetAbis, &Abi::toString).join(", ")));
} }
} }
@@ -507,7 +504,7 @@ QString ToolChainKitAspect::displayNamePostfix(const Kit *k) const
KitAspect::ItemList ToolChainKitAspect::toUserOutput(const Kit *k) const KitAspect::ItemList ToolChainKitAspect::toUserOutput(const Kit *k) const
{ {
ToolChain *tc = cxxToolChain(k); ToolChain *tc = cxxToolChain(k);
return {{tr("Compiler"), tc ? tc->displayName() : tr("None")}}; return {{Tr::tr("Compiler"), tc ? tc->displayName() : Tr::tr("None")}};
} }
void ToolChainKitAspect::addToBuildEnvironment(const Kit *k, Environment &env) const void ToolChainKitAspect::addToBuildEnvironment(const Kit *k, Environment &env) const
@@ -522,25 +519,25 @@ void ToolChainKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) c
QTC_ASSERT(kit, return); QTC_ASSERT(kit, return);
// Compatibility with Qt Creator < 4.2: // Compatibility with Qt Creator < 4.2:
expander->registerVariable("Compiler:Name", tr("Compiler"), expander->registerVariable("Compiler:Name", Tr::tr("Compiler"),
[kit] { [kit] {
const ToolChain *tc = cxxToolChain(kit); const ToolChain *tc = cxxToolChain(kit);
return tc ? tc->displayName() : tr("None"); return tc ? tc->displayName() : Tr::tr("None");
}); });
expander->registerVariable("Compiler:Executable", tr("Path to the compiler executable"), expander->registerVariable("Compiler:Executable", Tr::tr("Path to the compiler executable"),
[kit] { [kit] {
const ToolChain *tc = cxxToolChain(kit); const ToolChain *tc = cxxToolChain(kit);
return tc ? tc->compilerCommand().path() : QString(); return tc ? tc->compilerCommand().path() : QString();
}); });
// After 4.2 // After 4.2
expander->registerPrefix("Compiler:Name", tr("Compiler for different languages"), expander->registerPrefix("Compiler:Name", Tr::tr("Compiler for different languages"),
[kit](const QString &ls) { [kit](const QString &ls) {
const ToolChain *tc = toolChain(kit, findLanguage(ls)); const ToolChain *tc = toolChain(kit, findLanguage(ls));
return tc ? tc->displayName() : tr("None"); return tc ? tc->displayName() : Tr::tr("None");
}); });
expander->registerPrefix("Compiler:Executable", tr("Compiler executable for different languages"), expander->registerPrefix("Compiler:Executable", Tr::tr("Compiler executable for different languages"),
[kit](const QString &ls) { [kit](const QString &ls) {
const ToolChain *tc = toolChain(kit, findLanguage(ls)); const ToolChain *tc = toolChain(kit, findLanguage(ls));
return tc ? tc->compilerCommand().path() : QString(); return tc ? tc->compilerCommand().path() : QString();
@@ -710,7 +707,7 @@ Abi ToolChainKitAspect::targetAbi(const Kit *k)
QString ToolChainKitAspect::msgNoToolChainInTarget() QString ToolChainKitAspect::msgNoToolChainInTarget()
{ {
return tr("No compiler set in kit."); return Tr::tr("No compiler set in kit.");
} }
void ToolChainKitAspect::kitsWereLoaded() void ToolChainKitAspect::kitsWereLoaded()
@@ -747,8 +744,6 @@ void ToolChainKitAspect::toolChainRemoved(ToolChain *tc)
namespace Internal { namespace Internal {
class DeviceTypeKitAspectWidget final : public KitAspectWidget class DeviceTypeKitAspectWidget final : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::DeviceTypeKitAspect)
public: public:
DeviceTypeKitAspectWidget(Kit *workingCopy, const KitAspect *ki) DeviceTypeKitAspectWidget(Kit *workingCopy, const KitAspect *ki)
: KitAspectWidget(workingCopy, ki), m_comboBox(createSubWidget<QComboBox>()) : KitAspectWidget(workingCopy, ki), m_comboBox(createSubWidget<QComboBox>())
@@ -799,8 +794,8 @@ DeviceTypeKitAspect::DeviceTypeKitAspect()
{ {
setObjectName(QLatin1String("DeviceTypeInformation")); setObjectName(QLatin1String("DeviceTypeInformation"));
setId(DeviceTypeKitAspect::id()); setId(DeviceTypeKitAspect::id());
setDisplayName(tr("Device type")); setDisplayName(Tr::tr("Device type"));
setDescription(tr("The type of device to run applications on.")); setDescription(Tr::tr("The type of device to run applications on."));
setPriority(33000); setPriority(33000);
makeEssential(); makeEssential();
} }
@@ -827,12 +822,12 @@ KitAspect::ItemList DeviceTypeKitAspect::toUserOutput(const Kit *k) const
{ {
QTC_ASSERT(k, return {}); QTC_ASSERT(k, return {});
Id type = deviceTypeId(k); Id type = deviceTypeId(k);
QString typeDisplayName = tr("Unknown device type"); QString typeDisplayName = Tr::tr("Unknown device type");
if (type.isValid()) { if (type.isValid()) {
if (IDeviceFactory *factory = IDeviceFactory::find(type)) if (IDeviceFactory *factory = IDeviceFactory::find(type))
typeDisplayName = factory->displayName(); typeDisplayName = factory->displayName();
} }
return {{tr("Device type"), typeDisplayName}}; return {{Tr::tr("Device type"), typeDisplayName}};
} }
const Id DeviceTypeKitAspect::id() const Id DeviceTypeKitAspect::id()
@@ -870,8 +865,6 @@ QSet<Id> DeviceTypeKitAspect::availableFeatures(const Kit *k) const
namespace Internal { namespace Internal {
class DeviceKitAspectWidget final : public KitAspectWidget class DeviceKitAspectWidget final : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::DeviceKitAspect)
public: public:
DeviceKitAspectWidget(Kit *workingCopy, const KitAspect *ki) DeviceKitAspectWidget(Kit *workingCopy, const KitAspect *ki)
: KitAspectWidget(workingCopy, ki), : KitAspectWidget(workingCopy, ki),
@@ -948,8 +941,8 @@ DeviceKitAspect::DeviceKitAspect()
{ {
setObjectName(QLatin1String("DeviceInformation")); setObjectName(QLatin1String("DeviceInformation"));
setId(DeviceKitAspect::id()); setId(DeviceKitAspect::id());
setDisplayName(tr("Device")); setDisplayName(Tr::tr("Device"));
setDescription(tr("The device to run the applications on.")); setDescription(Tr::tr("The device to run the applications on."));
setPriority(32000); setPriority(32000);
connect(KitManager::instance(), &KitManager::kitsLoaded, connect(KitManager::instance(), &KitManager::kitsLoaded,
@@ -978,9 +971,9 @@ Tasks DeviceKitAspect::validate(const Kit *k) const
IDevice::ConstPtr dev = DeviceKitAspect::device(k); IDevice::ConstPtr dev = DeviceKitAspect::device(k);
Tasks result; Tasks result;
if (dev.isNull()) if (dev.isNull())
result.append(BuildSystemTask(Task::Warning, tr("No device set."))); result.append(BuildSystemTask(Task::Warning, Tr::tr("No device set.")));
else if (!dev->isCompatibleWith(k)) else if (!dev->isCompatibleWith(k))
result.append(BuildSystemTask(Task::Error, tr("Device is incompatible with this kit."))); result.append(BuildSystemTask(Task::Error, Tr::tr("Device is incompatible with this kit.")));
if (dev) if (dev)
result.append(dev->validate()); result.append(dev->validate());
@@ -1023,33 +1016,33 @@ QString DeviceKitAspect::displayNamePostfix(const Kit *k) const
KitAspect::ItemList DeviceKitAspect::toUserOutput(const Kit *k) const KitAspect::ItemList DeviceKitAspect::toUserOutput(const Kit *k) const
{ {
IDevice::ConstPtr dev = device(k); IDevice::ConstPtr dev = device(k);
return {{tr("Device"), dev.isNull() ? tr("Unconfigured") : dev->displayName()}}; return {{Tr::tr("Device"), dev.isNull() ? Tr::tr("Unconfigured") : dev->displayName()}};
} }
void DeviceKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const void DeviceKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{ {
QTC_ASSERT(kit, return); QTC_ASSERT(kit, return);
expander->registerVariable("Device:HostAddress", tr("Host address"), expander->registerVariable("Device:HostAddress", Tr::tr("Host address"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitAspect::device(kit); const IDevice::ConstPtr device = DeviceKitAspect::device(kit);
return device ? device->sshParameters().host() : QString(); return device ? device->sshParameters().host() : QString();
}); });
expander->registerVariable("Device:SshPort", tr("SSH port"), expander->registerVariable("Device:SshPort", Tr::tr("SSH port"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitAspect::device(kit); const IDevice::ConstPtr device = DeviceKitAspect::device(kit);
return device ? QString::number(device->sshParameters().port()) : QString(); return device ? QString::number(device->sshParameters().port()) : QString();
}); });
expander->registerVariable("Device:UserName", tr("User name"), expander->registerVariable("Device:UserName", Tr::tr("User name"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitAspect::device(kit); const IDevice::ConstPtr device = DeviceKitAspect::device(kit);
return device ? device->sshParameters().userName() : QString(); return device ? device->sshParameters().userName() : QString();
}); });
expander->registerVariable("Device:KeyFile", tr("Private key file"), expander->registerVariable("Device:KeyFile", Tr::tr("Private key file"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitAspect::device(kit); const IDevice::ConstPtr device = DeviceKitAspect::device(kit);
return device ? device->sshParameters().privateKeyFile.toString() : QString(); return device ? device->sshParameters().privateKeyFile.toString() : QString();
}); });
expander->registerVariable("Device:Name", tr("Device name"), expander->registerVariable("Device:Name", Tr::tr("Device name"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitAspect::device(kit); const IDevice::ConstPtr device = DeviceKitAspect::device(kit);
return device ? device->displayName() : QString(); return device ? device->displayName() : QString();
@@ -1135,8 +1128,6 @@ void DeviceKitAspect::devicesChanged()
namespace Internal { namespace Internal {
class BuildDeviceKitAspectWidget final : public KitAspectWidget class BuildDeviceKitAspectWidget final : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::BuildDeviceKitAspect)
public: public:
BuildDeviceKitAspectWidget(Kit *workingCopy, const KitAspect *ki) BuildDeviceKitAspectWidget(Kit *workingCopy, const KitAspect *ki)
: KitAspectWidget(workingCopy, ki), : KitAspectWidget(workingCopy, ki),
@@ -1219,8 +1210,8 @@ BuildDeviceKitAspect::BuildDeviceKitAspect()
{ {
setObjectName("BuildDeviceInformation"); setObjectName("BuildDeviceInformation");
setId(BuildDeviceKitAspect::id()); setId(BuildDeviceKitAspect::id());
setDisplayName(tr("Build device")); setDisplayName(Tr::tr("Build device"));
setDescription(tr("The device used to build applications on.")); setDescription(Tr::tr("The device used to build applications on."));
setPriority(31900); setPriority(31900);
connect(KitManager::instance(), &KitManager::kitsLoaded, connect(KitManager::instance(), &KitManager::kitsLoaded,
@@ -1248,7 +1239,7 @@ Tasks BuildDeviceKitAspect::validate(const Kit *k) const
IDevice::ConstPtr dev = BuildDeviceKitAspect::device(k); IDevice::ConstPtr dev = BuildDeviceKitAspect::device(k);
Tasks result; Tasks result;
if (dev.isNull()) if (dev.isNull())
result.append(BuildSystemTask(Task::Warning, tr("No build device set."))); result.append(BuildSystemTask(Task::Warning, Tr::tr("No build device set.")));
return result; return result;
} }
@@ -1268,33 +1259,33 @@ QString BuildDeviceKitAspect::displayNamePostfix(const Kit *k) const
KitAspect::ItemList BuildDeviceKitAspect::toUserOutput(const Kit *k) const KitAspect::ItemList BuildDeviceKitAspect::toUserOutput(const Kit *k) const
{ {
IDevice::ConstPtr dev = device(k); IDevice::ConstPtr dev = device(k);
return {{tr("Build device"), dev.isNull() ? tr("Unconfigured") : dev->displayName()}}; return {{Tr::tr("Build device"), dev.isNull() ? Tr::tr("Unconfigured") : dev->displayName()}};
} }
void BuildDeviceKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const void BuildDeviceKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{ {
QTC_ASSERT(kit, return); QTC_ASSERT(kit, return);
expander->registerVariable("BuildDevice:HostAddress", tr("Build host address"), expander->registerVariable("BuildDevice:HostAddress", Tr::tr("Build host address"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit); const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit);
return device ? device->sshParameters().host() : QString(); return device ? device->sshParameters().host() : QString();
}); });
expander->registerVariable("BuildDevice:SshPort", tr("Build SSH port"), expander->registerVariable("BuildDevice:SshPort", Tr::tr("Build SSH port"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit); const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit);
return device ? QString::number(device->sshParameters().port()) : QString(); return device ? QString::number(device->sshParameters().port()) : QString();
}); });
expander->registerVariable("BuildDevice:UserName", tr("Build user name"), expander->registerVariable("BuildDevice:UserName", Tr::tr("Build user name"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit); const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit);
return device ? device->sshParameters().userName() : QString(); return device ? device->sshParameters().userName() : QString();
}); });
expander->registerVariable("BuildDevice:KeyFile", tr("Build private key file"), expander->registerVariable("BuildDevice:KeyFile", Tr::tr("Build private key file"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit); const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit);
return device ? device->sshParameters().privateKeyFile.toString() : QString(); return device ? device->sshParameters().privateKeyFile.toString() : QString();
}); });
expander->registerVariable("BuildDevice:Name", tr("Build device name"), expander->registerVariable("BuildDevice:Name", Tr::tr("Build device name"),
[kit]() -> QString { [kit]() -> QString {
const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit); const IDevice::ConstPtr device = BuildDeviceKitAspect::device(kit);
return device ? device->displayName() : QString(); return device ? device->displayName() : QString();
@@ -1376,8 +1367,6 @@ void BuildDeviceKitAspect::devicesChanged()
namespace Internal { namespace Internal {
class EnvironmentKitAspectWidget final : public KitAspectWidget class EnvironmentKitAspectWidget final : public KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::EnvironmentKitAspect)
public: public:
EnvironmentKitAspectWidget(Kit *workingCopy, const KitAspect *ki) EnvironmentKitAspectWidget(Kit *workingCopy, const KitAspect *ki)
: KitAspectWidget(workingCopy, ki), : KitAspectWidget(workingCopy, ki),
@@ -1392,7 +1381,7 @@ public:
initMSVCOutputSwitch(layout); initMSVCOutputSwitch(layout);
m_mainWidget->setLayout(layout); m_mainWidget->setLayout(layout);
refresh(); refresh();
m_manageButton->setText(tr("Change...")); m_manageButton->setText(Tr::tr("Change..."));
connect(m_manageButton, &QAbstractButton::clicked, connect(m_manageButton, &QAbstractButton::clicked,
this, &EnvironmentKitAspectWidget::editEnvironmentChanges); this, &EnvironmentKitAspectWidget::editEnvironmentChanges);
} }
@@ -1411,7 +1400,7 @@ private:
{ {
const EnvironmentItems changes = currentEnvironment(); const EnvironmentItems changes = currentEnvironment();
const QString shortSummary = EnvironmentItem::toStringList(changes).join("; "); const QString shortSummary = EnvironmentItem::toStringList(changes).join("; ");
m_summaryLabel->setText(shortSummary.isEmpty() ? tr("No changes to apply.") : shortSummary); m_summaryLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.") : shortSummary);
} }
void editEnvironmentChanges() void editEnvironmentChanges()
@@ -1454,9 +1443,9 @@ private:
void initMSVCOutputSwitch(QVBoxLayout *layout) void initMSVCOutputSwitch(QVBoxLayout *layout)
{ {
m_vslangCheckbox = new QCheckBox(tr("Force UTF-8 MSVC compiler output")); m_vslangCheckbox = new QCheckBox(Tr::tr("Force UTF-8 MSVC compiler output"));
layout->addWidget(m_vslangCheckbox); layout->addWidget(m_vslangCheckbox);
m_vslangCheckbox->setToolTip(tr("Either switches MSVC to English or keeps the language and " m_vslangCheckbox->setToolTip(Tr::tr("Either switches MSVC to English or keeps the language and "
"just forces UTF-8 output (may vary depending on the used MSVC " "just forces UTF-8 output (may vary depending on the used MSVC "
"compiler).")); "compiler)."));
connect(m_vslangCheckbox, &QCheckBox::toggled, this, [this](bool checked) { connect(m_vslangCheckbox, &QCheckBox::toggled, this, [this](bool checked) {
@@ -1481,8 +1470,8 @@ EnvironmentKitAspect::EnvironmentKitAspect()
{ {
setObjectName(QLatin1String("EnvironmentKitAspect")); setObjectName(QLatin1String("EnvironmentKitAspect"));
setId(EnvironmentKitAspect::id()); setId(EnvironmentKitAspect::id());
setDisplayName(tr("Environment")); setDisplayName(Tr::tr("Environment"));
setDescription(tr("Additional build environment settings when using this kit.")); setDescription(Tr::tr("Additional build environment settings when using this kit."));
setPriority(29000); setPriority(29000);
} }
@@ -1493,7 +1482,7 @@ Tasks EnvironmentKitAspect::validate(const Kit *k) const
const QVariant variant = k->value(EnvironmentKitAspect::id()); const QVariant variant = k->value(EnvironmentKitAspect::id());
if (!variant.isNull() && !variant.canConvert(QVariant::List)) if (!variant.isNull() && !variant.canConvert(QVariant::List))
result << BuildSystemTask(Task::Error, tr("The environment setting value is invalid.")); result << BuildSystemTask(Task::Error, Tr::tr("The environment setting value is invalid."));
return result; return result;
} }
@@ -1530,7 +1519,7 @@ KitAspectWidget *EnvironmentKitAspect::createConfigWidget(Kit *k) const
KitAspect::ItemList EnvironmentKitAspect::toUserOutput(const Kit *k) const KitAspect::ItemList EnvironmentKitAspect::toUserOutput(const Kit *k) const
{ {
return {{tr("Environment"), EnvironmentItem::toStringList(environmentChanges(k)).join("<br>")}}; return {{Tr::tr("Environment"), EnvironmentItem::toStringList(environmentChanges(k)).join("<br>")}};
} }
Id EnvironmentKitAspect::id() Id EnvironmentKitAspect::id()

View File

@@ -11,6 +11,7 @@
#include "kitmanagerconfigwidget.h" #include "kitmanagerconfigwidget.h"
#include "project.h" #include "project.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "task.h" #include "task.h"
#include "toolchainmanager.h" #include "toolchainmanager.h"
@@ -344,7 +345,7 @@ void KitManager::restoreKits()
continue; continue;
} }
if (isHostKit(kit.get())) if (isHostKit(kit.get()))
kit->setUnexpandedDisplayName(tr("Desktop (%1)").arg(it.key().toString())); kit->setUnexpandedDisplayName(Tr::tr("Desktop (%1)").arg(it.key().toString()));
else else
kit->setUnexpandedDisplayName(it.key().toString()); kit->setUnexpandedDisplayName(it.key().toString());
DeviceTypeKitAspect::setDeviceTypeId(kit.get(), deviceTypeForKit(kit.get())); DeviceTypeKitAspect::setDeviceTypeId(kit.get(), deviceTypeForKit(kit.get()));
@@ -396,7 +397,7 @@ void KitManager::restoreKits()
} }
if (hostKits.size() == 1) if (hostKits.size() == 1)
hostKits.first()->setUnexpandedDisplayName(tr("Desktop")); hostKits.first()->setUnexpandedDisplayName(Tr::tr("Desktop"));
} }
Kit *k = kitForBinary; Kit *k = kitForBinary;
@@ -726,7 +727,7 @@ KitAspectWidget::KitAspectWidget(Kit *kit, const KitAspect *ki)
: m_kit(kit), m_kitInformation(ki) : m_kit(kit), m_kitInformation(ki)
{ {
const Id id = ki->id(); const Id id = ki->id();
m_mutableAction = new QAction(tr("Mark as Mutable")); m_mutableAction = new QAction(Tr::tr("Mark as Mutable"));
m_mutableAction->setCheckable(true); m_mutableAction->setCheckable(true);
m_mutableAction->setChecked(m_kit->isMutable(id)); m_mutableAction->setChecked(m_kit->isMutable(id));
m_mutableAction->setEnabled(!m_kit->isSticky(id)); m_mutableAction->setEnabled(!m_kit->isSticky(id));
@@ -773,7 +774,7 @@ QWidget *KitAspectWidget::createManageButton(Id pageId)
QString KitAspectWidget::msgManage() QString KitAspectWidget::msgManage()
{ {
return tr("Manage..."); return Tr::tr("Manage...");
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------

View File

@@ -2,13 +2,12 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "kitmanagerconfigwidget.h" #include "kitmanagerconfigwidget.h"
#include "projectconfiguration.h"
#include "devicesupport/idevicefactory.h" #include "devicesupport/idevicefactory.h"
#include "kit.h" #include "kit.h"
#include "kitinformation.h" #include "kitinformation.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "projectexplorerconstants.h" #include "projectexplorertr.h"
#include "task.h" #include "task.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -46,11 +45,11 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
{ {
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
auto label = new QLabel(tr("Name:")); auto label = new QLabel(Tr::tr("Name:"));
label->setToolTip(tr("Kit name and icon.")); label->setToolTip(Tr::tr("Kit name and icon."));
QString toolTip = QString toolTip =
tr("<html><head/><body><p>The name of the kit suitable for generating " Tr::tr("<html><head/><body><p>The name of the kit suitable for generating "
"directory names. This value is used for the variable <i>%1</i>, " "directory names. This value is used for the variable <i>%1</i>, "
"which for example determines the name of the shadow build directory." "which for example determines the name of the shadow build directory."
"</p></body></html>").arg(QLatin1String("Kit:FileSystemName")); "</p></body></html>").arg(QLatin1String("Kit:FileSystemName"));
@@ -59,7 +58,7 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
Q_ASSERT(fileSystemFriendlyNameRegexp.isValid()); Q_ASSERT(fileSystemFriendlyNameRegexp.isValid());
m_fileSystemFriendlyNameLineEdit->setValidator(new QRegularExpressionValidator(fileSystemFriendlyNameRegexp, m_fileSystemFriendlyNameLineEdit)); m_fileSystemFriendlyNameLineEdit->setValidator(new QRegularExpressionValidator(fileSystemFriendlyNameRegexp, m_fileSystemFriendlyNameLineEdit));
auto fsLabel = new QLabel(tr("File system name:")); auto fsLabel = new QLabel(Tr::tr("File system name:"));
fsLabel->setToolTip(toolTip); fsLabel->setToolTip(toolTip);
connect(m_fileSystemFriendlyNameLineEdit, &QLineEdit::textChanged, connect(m_fileSystemFriendlyNameLineEdit, &QLineEdit::textChanged,
this, &KitManagerConfigWidget::setFileSystemFriendlyName); this, &KitManagerConfigWidget::setFileSystemFriendlyName);
@@ -70,10 +69,10 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
fsLabel, m_fileSystemFriendlyNameLineEdit fsLabel, m_fileSystemFriendlyNameLineEdit
}.attachTo(this, WithFormAlignment); }.attachTo(this, WithFormAlignment);
m_iconButton->setToolTip(tr("Kit icon.")); m_iconButton->setToolTip(Tr::tr("Kit icon."));
auto setIconAction = new QAction(tr("Select Icon..."), this); auto setIconAction = new QAction(Tr::tr("Select Icon..."), this);
m_iconButton->addAction(setIconAction); m_iconButton->addAction(setIconAction);
auto resetIconAction = new QAction(tr("Reset to Device Default Icon"), this); auto resetIconAction = new QAction(Tr::tr("Reset to Device Default Icon"), this);
m_iconButton->addAction(resetIconAction); m_iconButton->addAction(resetIconAction);
discard(); discard();
@@ -183,7 +182,7 @@ QString KitManagerConfigWidget::validityMessage() const
{ {
Tasks tmp; Tasks tmp;
if (!m_hasUniqueName) if (!m_hasUniqueName)
tmp.append(CompileTask(Task::Warning, tr("Display name is not unique."))); tmp.append(CompileTask(Task::Warning, Tr::tr("Display name is not unique.")));
return m_modifiedKit->toHtml(tmp); return m_modifiedKit->toHtml(tmp);
} }
@@ -276,7 +275,7 @@ void KitManagerConfigWidget::setIcon()
if (factory->icon().isNull()) if (factory->icon().isNull())
continue; continue;
QAction *action = iconMenu.addAction(factory->icon(), QAction *action = iconMenu.addAction(factory->icon(),
tr("Default for %1").arg(factory->displayName()), Tr::tr("Default for %1").arg(factory->displayName()),
[this, factory] { [this, factory] {
m_iconButton->setIcon(factory->icon()); m_iconButton->setIcon(factory->icon());
m_modifiedKit->setDeviceTypeForIcon( m_modifiedKit->setDeviceTypeForIcon(
@@ -287,9 +286,9 @@ void KitManagerConfigWidget::setIcon()
} }
iconMenu.addSeparator(); iconMenu.addSeparator();
iconMenu.addAction(PathChooser::browseButtonLabel(), [this] { iconMenu.addAction(PathChooser::browseButtonLabel(), [this] {
const FilePath path = FileUtils::getOpenFilePath(this, tr("Select Icon"), const FilePath path = FileUtils::getOpenFilePath(this, Tr::tr("Select Icon"),
m_modifiedKit->iconPath(), m_modifiedKit->iconPath(),
tr("Images (*.png *.xpm *.jpg)")); Tr::tr("Images (*.png *.xpm *.jpg)"));
if (path.isEmpty()) if (path.isEmpty())
return; return;
const QIcon icon(path.toString()); const QIcon icon(path.toString());

View File

@@ -6,8 +6,9 @@
#include "kit.h" #include "kit.h"
#include "kitmanagerconfigwidget.h" #include "kitmanagerconfigwidget.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
@@ -60,7 +61,7 @@ public:
QString baseName = widget->displayName(); QString baseName = widget->displayName();
if (widget->isDefaultKit()) if (widget->isDefaultKit())
//: Mark up a kit as the default one. //: Mark up a kit as the default one.
baseName = KitModel::tr("%1 (default)").arg(baseName); baseName = Tr::tr("%1 (default)").arg(baseName);
return baseName; return baseName;
} }
if (role == Qt::DecorationRole) { if (role == Qt::DecorationRole) {
@@ -84,7 +85,7 @@ KitModel::KitModel(QBoxLayout *parentLayout, QObject *parent)
: TreeModel<TreeItem, TreeItem, KitNode>(parent), : TreeModel<TreeItem, TreeItem, KitNode>(parent),
m_parentLayout(parentLayout) m_parentLayout(parentLayout)
{ {
setHeader(QStringList(tr("Name"))); setHeader(QStringList(Tr::tr("Name")));
m_autoRoot = new StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()}, m_autoRoot = new StaticTreeItem({ProjectExplorer::Constants::msgAutoDetected()},
{ProjectExplorer::Constants::msgAutoDetectedToolTip()}); {ProjectExplorer::Constants::msgAutoDetectedToolTip()});
m_manualRoot = new StaticTreeItem(ProjectExplorer::Constants::msgManual()); m_manualRoot = new StaticTreeItem(ProjectExplorer::Constants::msgManual());

View File

@@ -7,7 +7,7 @@
#include "kitmodel.h" #include "kitmodel.h"
#include "kit.h" #include "kit.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorericons.h" #include "projectexplorertr.h"
#include "kitmanagerconfigwidget.h" #include "kitmanagerconfigwidget.h"
#include "kitmanager.h" #include "kitmanager.h"
@@ -29,8 +29,6 @@ namespace Internal {
class KitOptionsPageWidget : public QWidget class KitOptionsPageWidget : public QWidget
{ {
Q_DECLARE_TR_FUNCTIONS(ProjextExplorer::Internal::KitOptionsPageWidget)
public: public:
KitOptionsPageWidget(); KitOptionsPageWidget();
@@ -66,14 +64,14 @@ KitOptionsPageWidget::KitOptionsPageWidget()
m_kitsView->setSizePolicy(m_kitsView->sizePolicy().horizontalPolicy(), m_kitsView->setSizePolicy(m_kitsView->sizePolicy().horizontalPolicy(),
QSizePolicy::Ignored); QSizePolicy::Ignored);
m_addButton = new QPushButton(tr("Add"), this); m_addButton = new QPushButton(Tr::tr("Add"), this);
m_cloneButton = new QPushButton(tr("Clone"), this); m_cloneButton = new QPushButton(Tr::tr("Clone"), this);
m_delButton = new QPushButton(tr("Remove"), this); m_delButton = new QPushButton(Tr::tr("Remove"), this);
m_makeDefaultButton = new QPushButton(tr("Make Default"), this); m_makeDefaultButton = new QPushButton(Tr::tr("Make Default"), this);
m_filterButton = new QPushButton(tr("Settings Filter..."), this); m_filterButton = new QPushButton(Tr::tr("Settings Filter..."), this);
m_filterButton->setToolTip(tr("Choose which settings to display for this kit.")); m_filterButton->setToolTip(Tr::tr("Choose which settings to display for this kit."));
m_defaultFilterButton = new QPushButton(tr("Default Settings Filter..."), this); m_defaultFilterButton = new QPushButton(Tr::tr("Default Settings Filter..."), this);
m_defaultFilterButton->setToolTip(tr("Choose which kit settings to display by default.")); m_defaultFilterButton->setToolTip(Tr::tr("Choose which kit settings to display by default."));
auto buttonLayout = new QVBoxLayout; auto buttonLayout = new QVBoxLayout;
buttonLayout->setSpacing(6); buttonLayout->setSpacing(6);
@@ -247,9 +245,9 @@ KitOptionsPage::KitOptionsPage()
{ {
theKitOptionsPage = this; theKitOptionsPage = this;
setId(Constants::KITS_SETTINGS_PAGE_ID); setId(Constants::KITS_SETTINGS_PAGE_ID);
setDisplayName(Internal::KitOptionsPageWidget::tr("Kits")); setDisplayName(Tr::tr("Kits"));
setCategory(Constants::KITS_SETTINGS_CATEGORY); setCategory(Constants::KITS_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("::ProjectExplorer", "Kits")); setDisplayCategory(Tr::tr("Kits"));
setCategoryIconPath(":/projectexplorer/images/settingscategory_kits.png"); setCategoryIconPath(":/projectexplorer/images/settingscategory_kits.png");
} }

View File

@@ -4,8 +4,8 @@
#include "localenvironmentaspect.h" #include "localenvironmentaspect.h"
#include "buildconfiguration.h" #include "buildconfiguration.h"
#include "environmentaspectwidget.h"
#include "kit.h" #include "kit.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
using namespace Utils; using namespace Utils;
@@ -15,14 +15,14 @@ namespace ProjectExplorer {
LocalEnvironmentAspect::LocalEnvironmentAspect(Target *target, bool includeBuildEnvironment) LocalEnvironmentAspect::LocalEnvironmentAspect(Target *target, bool includeBuildEnvironment)
{ {
setIsLocal(true); setIsLocal(true);
addSupportedBaseEnvironment(tr("Clean Environment"), {}); addSupportedBaseEnvironment(Tr::tr("Clean Environment"), {});
addSupportedBaseEnvironment(tr("System Environment"), [] { addSupportedBaseEnvironment(Tr::tr("System Environment"), [] {
return Environment::systemEnvironment(); return Environment::systemEnvironment();
}); });
if (includeBuildEnvironment) { if (includeBuildEnvironment) {
addPreferredBaseEnvironment(tr("Build Environment"), [target] { addPreferredBaseEnvironment(Tr::tr("Build Environment"), [target] {
Environment env; Environment env;
if (BuildConfiguration *bc = target->activeBuildConfiguration()) { if (BuildConfiguration *bc = target->activeBuildConfiguration()) {
env = bc->environment(); env = bc->environment();

View File

@@ -9,6 +9,7 @@
#include "processparameters.h" #include "processparameters.h"
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "target.h" #include "target.h"
#include "toolchain.h" #include "toolchain.h"
@@ -57,41 +58,41 @@ MakeStep::MakeStep(BuildStepList *parent, Id id)
m_userArgumentsAspect = addAspect<StringAspect>(); m_userArgumentsAspect = addAspect<StringAspect>();
m_userArgumentsAspect->setSettingsKey(id.withSuffix(MAKE_ARGUMENTS_SUFFIX).toString()); m_userArgumentsAspect->setSettingsKey(id.withSuffix(MAKE_ARGUMENTS_SUFFIX).toString());
m_userArgumentsAspect->setLabelText(tr("Make arguments:")); m_userArgumentsAspect->setLabelText(Tr::tr("Make arguments:"));
m_userArgumentsAspect->setDisplayStyle(StringAspect::LineEditDisplay); m_userArgumentsAspect->setDisplayStyle(StringAspect::LineEditDisplay);
m_userJobCountAspect = addAspect<IntegerAspect>(); m_userJobCountAspect = addAspect<IntegerAspect>();
m_userJobCountAspect->setSettingsKey(id.withSuffix(JOBCOUNT_SUFFIX).toString()); m_userJobCountAspect->setSettingsKey(id.withSuffix(JOBCOUNT_SUFFIX).toString());
m_userJobCountAspect->setLabel(tr("Parallel jobs:")); m_userJobCountAspect->setLabel(Tr::tr("Parallel jobs:"));
m_userJobCountAspect->setRange(1, 999); m_userJobCountAspect->setRange(1, 999);
m_userJobCountAspect->setValue(defaultJobCount()); m_userJobCountAspect->setValue(defaultJobCount());
m_userJobCountAspect->setDefaultValue(defaultJobCount()); m_userJobCountAspect->setDefaultValue(defaultJobCount());
const QString text = tr("Override MAKEFLAGS"); const QString text = Tr::tr("Override MAKEFLAGS");
m_overrideMakeflagsAspect = addAspect<BoolAspect>(); m_overrideMakeflagsAspect = addAspect<BoolAspect>();
m_overrideMakeflagsAspect->setSettingsKey(id.withSuffix(OVERRIDE_MAKEFLAGS_SUFFIX).toString()); m_overrideMakeflagsAspect->setSettingsKey(id.withSuffix(OVERRIDE_MAKEFLAGS_SUFFIX).toString());
m_overrideMakeflagsAspect->setLabel(text, BoolAspect::LabelPlacement::AtCheckBox); m_overrideMakeflagsAspect->setLabel(text, BoolAspect::LabelPlacement::AtCheckBox);
m_nonOverrideWarning = addAspect<TextDisplay>(); m_nonOverrideWarning = addAspect<TextDisplay>();
m_nonOverrideWarning->setText("<html><body><p>" + m_nonOverrideWarning->setText("<html><body><p>" +
tr("<code>MAKEFLAGS</code> specifies parallel jobs. Check \"%1\" to override.") Tr::tr("<code>MAKEFLAGS</code> specifies parallel jobs. Check \"%1\" to override.")
.arg(text) + "</p></body></html>"); .arg(text) + "</p></body></html>");
m_nonOverrideWarning->setIconType(InfoLabel::Warning); m_nonOverrideWarning->setIconType(InfoLabel::Warning);
m_disabledForSubdirsAspect = addAspect<BoolAspect>(); m_disabledForSubdirsAspect = addAspect<BoolAspect>();
m_disabledForSubdirsAspect->setSettingsKey(id.withSuffix(".disabledForSubdirs").toString()); m_disabledForSubdirsAspect->setSettingsKey(id.withSuffix(".disabledForSubdirs").toString());
m_disabledForSubdirsAspect->setLabel(tr("Disable in subdirectories:")); m_disabledForSubdirsAspect->setLabel(Tr::tr("Disable in subdirectories:"));
m_disabledForSubdirsAspect->setToolTip(tr("Runs this step only for a top-level build.")); m_disabledForSubdirsAspect->setToolTip(Tr::tr("Runs this step only for a top-level build."));
m_buildTargetsAspect = addAspect<MultiSelectionAspect>(); m_buildTargetsAspect = addAspect<MultiSelectionAspect>();
m_buildTargetsAspect->setSettingsKey(id.withSuffix(BUILD_TARGETS_SUFFIX).toString()); m_buildTargetsAspect->setSettingsKey(id.withSuffix(BUILD_TARGETS_SUFFIX).toString());
m_buildTargetsAspect->setLabelText(tr("Targets:")); m_buildTargetsAspect->setLabelText(Tr::tr("Targets:"));
const auto updateMakeLabel = [this] { const auto updateMakeLabel = [this] {
const FilePath defaultMake = defaultMakeCommand(); const FilePath defaultMake = defaultMakeCommand();
const QString labelText = defaultMake.isEmpty() const QString labelText = defaultMake.isEmpty()
? tr("Make:") ? Tr::tr("Make:")
: tr("Override %1:").arg(defaultMake.toUserOutput()); : Tr::tr("Override %1:").arg(defaultMake.toUserOutput());
m_makeCommandAspect->setLabelText(labelText); m_makeCommandAspect->setLabelText(labelText);
}; };
@@ -137,7 +138,7 @@ void MakeStep::setupOutputFormatter(OutputFormatter *formatter)
QString MakeStep::defaultDisplayName() QString MakeStep::defaultDisplayName()
{ {
return tr("Make"); return Tr::tr("Make");
} }
static const QList<ToolChain *> preferredToolChains(const Kit *kit) static const QList<ToolChain *> preferredToolChains(const Kit *kit)
@@ -169,7 +170,7 @@ FilePath MakeStep::defaultMakeCommand() const
QString MakeStep::msgNoMakeCommand() QString MakeStep::msgNoMakeCommand()
{ {
return tr("Make command missing. Specify Make command in step configuration."); return Tr::tr("Make command missing. Specify Make command in step configuration.");
} }
Task MakeStep::makeCommandMissingTask() Task MakeStep::makeCommandMissingTask()
@@ -331,10 +332,10 @@ QWidget *MakeStep::createConfigWidget()
setSummaryUpdater([this] { setSummaryUpdater([this] {
const CommandLine make = effectiveMakeCommand(MakeStep::Display); const CommandLine make = effectiveMakeCommand(MakeStep::Display);
if (make.executable().isEmpty()) if (make.executable().isEmpty())
return tr("<b>Make:</b> %1").arg(MakeStep::msgNoMakeCommand()); return Tr::tr("<b>Make:</b> %1").arg(MakeStep::msgNoMakeCommand());
if (!buildConfiguration()) if (!buildConfiguration())
return tr("<b>Make:</b> No build configuration."); return Tr::tr("<b>Make:</b> No build configuration.");
ProcessParameters param; ProcessParameters param;
param.setMacroExpander(macroExpander()); param.setMacroExpander(macroExpander());
@@ -343,7 +344,7 @@ QWidget *MakeStep::createConfigWidget()
param.setEnvironment(buildEnvironment()); param.setEnvironment(buildEnvironment());
if (param.commandMissing()) { if (param.commandMissing()) {
return tr("<b>Make:</b> %1 not found in the environment.") return Tr::tr("<b>Make:</b> %1 not found in the environment.")
.arg(param.command().executable().toUserOutput()); // Override display text .arg(param.command().executable().toUserOutput()); // Override display text
} }

View File

@@ -12,6 +12,7 @@
#include "projectexplorer.h" #include "projectexplorer.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorericons.h" #include "projectexplorericons.h"
#include "projectexplorertr.h"
#include "runconfiguration.h" #include "runconfiguration.h"
#include "session.h" #include "session.h"
#include "target.h" #include "target.h"
@@ -121,7 +122,7 @@ private:
QVariant data(int column, int role) const override QVariant data(int column, int role) const override
{ {
if (column == 1 && role == Qt::ToolTipRole) if (column == 1 && role == Qt::ToolTipRole)
return QCoreApplication::translate("RunConfigSelector", "Run Without Deployment"); return Tr::tr("Run Without Deployment");
if (column != 0) if (column != 0)
return {}; return {};
switch (role) { switch (role) {
@@ -676,14 +677,14 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
m_titleWidgets.resize(LAST); m_titleWidgets.resize(LAST);
m_listWidgets[PROJECT] = nullptr; //project is not a generic list widget m_listWidgets[PROJECT] = nullptr; //project is not a generic list widget
m_titleWidgets[PROJECT] = createTitleLabel(tr("Project")); m_titleWidgets[PROJECT] = createTitleLabel(Tr::tr("Project"));
m_projectListWidget = new ProjectListView(this); m_projectListWidget = new ProjectListView(this);
connect(m_projectListWidget, &QAbstractItemView::doubleClicked, connect(m_projectListWidget, &QAbstractItemView::doubleClicked,
this, &MiniProjectTargetSelector::hide); this, &MiniProjectTargetSelector::hide);
QStringList titles; QStringList titles;
titles << tr("Kit") << tr("Build") titles << Tr::tr("Kit") << Tr::tr("Build")
<< tr("Deploy") << tr("Run"); << Tr::tr("Deploy") << Tr::tr("Run");
for (int i = TARGET; i < LAST; ++i) { for (int i = TARGET; i < LAST; ++i) {
m_titleWidgets[i] = createTitleLabel(titles.at(i -1)); m_titleWidgets[i] = createTitleLabel(titles.at(i -1));
@@ -1487,24 +1488,24 @@ void MiniProjectTargetSelector::updateActionAndSummary()
} }
m_projectAction->setProperty("heading", projectName); m_projectAction->setProperty("heading", projectName);
if (project && project->needsConfiguration()) if (project && project->needsConfiguration())
m_projectAction->setProperty("subtitle", tr("Unconfigured")); m_projectAction->setProperty("subtitle", Tr::tr("Unconfigured"));
else else
m_projectAction->setProperty("subtitle", buildConfig); m_projectAction->setProperty("subtitle", buildConfig);
m_projectAction->setIcon(targetIcon); m_projectAction->setIcon(targetIcon);
QStringList lines; QStringList lines;
lines << tr("<b>Project:</b> %1").arg(projectName); lines << Tr::tr("<b>Project:</b> %1").arg(projectName);
if (!fileName.isEmpty()) if (!fileName.isEmpty())
lines << tr("<b>Path:</b> %1").arg(fileName); lines << Tr::tr("<b>Path:</b> %1").arg(fileName);
if (!targetName.isEmpty()) if (!targetName.isEmpty())
lines << tr("<b>Kit:</b> %1").arg(targetName); lines << Tr::tr("<b>Kit:</b> %1").arg(targetName);
if (!buildConfig.isEmpty()) if (!buildConfig.isEmpty())
lines << tr("<b>Build:</b> %1").arg(buildConfig); lines << Tr::tr("<b>Build:</b> %1").arg(buildConfig);
if (!deployConfig.isEmpty()) if (!deployConfig.isEmpty())
lines << tr("<b>Deploy:</b> %1").arg(deployConfig); lines << Tr::tr("<b>Deploy:</b> %1").arg(deployConfig);
if (!runConfig.isEmpty()) if (!runConfig.isEmpty())
lines << tr("<b>Run:</b> %1").arg(runConfig); lines << Tr::tr("<b>Run:</b> %1").arg(runConfig);
if (!targetToolTipText.isEmpty()) if (!targetToolTipText.isEmpty())
lines << tr("%1").arg(targetToolTipText); lines << Tr::tr("%1").arg(targetToolTipText);
QString toolTip = QString("<html><nobr>%1</html>") QString toolTip = QString("<html><nobr>%1</html>")
.arg(lines.join(QLatin1String("<br/>"))); .arg(lines.join(QLatin1String("<br/>")));
m_projectAction->setToolTip(toolTip); m_projectAction->setToolTip(toolTip);
@@ -1516,21 +1517,21 @@ void MiniProjectTargetSelector::updateSummary()
QString summary; QString summary;
if (Project *startupProject = SessionManager::startupProject()) { if (Project *startupProject = SessionManager::startupProject()) {
if (!m_projectListWidget->isVisibleTo(this)) if (!m_projectListWidget->isVisibleTo(this))
summary.append(tr("Project: <b>%1</b><br/>").arg(startupProject->displayName())); summary.append(Tr::tr("Project: <b>%1</b><br/>").arg(startupProject->displayName()));
if (Target *activeTarget = startupProject->activeTarget()) { if (Target *activeTarget = startupProject->activeTarget()) {
if (!m_listWidgets[TARGET]->isVisibleTo(this)) if (!m_listWidgets[TARGET]->isVisibleTo(this))
summary.append(tr("Kit: <b>%1</b><br/>").arg( activeTarget->displayName())); summary.append(Tr::tr("Kit: <b>%1</b><br/>").arg( activeTarget->displayName()));
if (!m_listWidgets[BUILD]->isVisibleTo(this) && activeTarget->activeBuildConfiguration()) if (!m_listWidgets[BUILD]->isVisibleTo(this) && activeTarget->activeBuildConfiguration())
summary.append(tr("Build: <b>%1</b><br/>").arg( summary.append(Tr::tr("Build: <b>%1</b><br/>").arg(
activeTarget->activeBuildConfiguration()->displayName())); activeTarget->activeBuildConfiguration()->displayName()));
if (!m_listWidgets[DEPLOY]->isVisibleTo(this) && activeTarget->activeDeployConfiguration()) if (!m_listWidgets[DEPLOY]->isVisibleTo(this) && activeTarget->activeDeployConfiguration())
summary.append(tr("Deploy: <b>%1</b><br/>").arg( summary.append(Tr::tr("Deploy: <b>%1</b><br/>").arg(
activeTarget->activeDeployConfiguration()->displayName())); activeTarget->activeDeployConfiguration()->displayName()));
if (!m_listWidgets[RUN]->isVisibleTo(this) && activeTarget->activeRunConfiguration()) if (!m_listWidgets[RUN]->isVisibleTo(this) && activeTarget->activeRunConfiguration())
summary.append(tr("Run: <b>%1</b><br/>").arg( summary.append(Tr::tr("Run: <b>%1</b><br/>").arg(
activeTarget->activeRunConfiguration()->expandedDisplayName())); activeTarget->activeRunConfiguration()->expandedDisplayName()));
} else if (startupProject->needsConfiguration()) { } else if (startupProject->needsConfiguration()) {
summary = tr("<style type=text/css>" summary = Tr::tr("<style type=text/css>"
"a:link {color: rgb(128, 128, 255);}</style>" "a:link {color: rgb(128, 128, 255);}</style>"
"The project <b>%1</b> is not yet configured<br/><br/>" "The project <b>%1</b> is not yet configured<br/><br/>"
"You can configure it in the <a href=\"projectmode\">Projects mode</a><br/>") "You can configure it in the <a href=\"projectmode\">Projects mode</a><br/>")

View File

@@ -859,7 +859,7 @@ MsvcToolChain::MsvcToolChain(Utils::Id typeId)
: ToolChain(typeId) : ToolChain(typeId)
{ {
setDisplayName("Microsoft Visual C++ Compiler"); setDisplayName("Microsoft Visual C++ Compiler");
setTypeDisplayName(tr("MSVC")); setTypeDisplayName(Tr::tr("MSVC"));
addToAvailableMsvcToolchains(this); addToAvailableMsvcToolchains(this);
setTargetAbiKey(KEY_ROOT "SupportedAbi"); setTargetAbiKey(KEY_ROOT "SupportedAbi");
} }
@@ -1274,7 +1274,7 @@ MsvcBasedToolChainConfigWidget::MsvcBasedToolChainConfigWidget(ToolChain *tc)
m_nameDisplayLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); m_nameDisplayLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
m_mainLayout->addRow(m_nameDisplayLabel); m_mainLayout->addRow(m_nameDisplayLabel);
m_varsBatDisplayLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); m_varsBatDisplayLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
m_mainLayout->addRow(tr("Initialization:"), m_varsBatDisplayLabel); m_mainLayout->addRow(Tr::tr("Initialization:"), m_varsBatDisplayLabel);
} }
static QString msvcVarsToDisplay(const MsvcToolChain &tc) static QString msvcVarsToDisplay(const MsvcToolChain &tc)
@@ -1322,7 +1322,7 @@ MsvcToolChainConfigWidget::MsvcToolChainConfigWidget(ToolChain *tc)
const bool isAmd64 const bool isAmd64
= Utils::HostOsInfo::hostArchitecture() == Utils::HostOsInfo::HostArchitectureAMD64; = Utils::HostOsInfo::hostArchitecture() == Utils::HostOsInfo::HostArchitectureAMD64;
// TODO: Add missing values to MsvcToolChain::Platform // TODO: Add missing values to MsvcToolChain::Platform
m_varsBatArchCombo->addItem(tr("<empty>"), isAmd64 ? MsvcToolChain::amd64 : MsvcToolChain::x86); m_varsBatArchCombo->addItem(Tr::tr("<empty>"), isAmd64 ? MsvcToolChain::amd64 : MsvcToolChain::x86);
m_varsBatArchCombo->addItem("x86", MsvcToolChain::x86); m_varsBatArchCombo->addItem("x86", MsvcToolChain::x86);
m_varsBatArchCombo->addItem("amd64", MsvcToolChain::amd64); m_varsBatArchCombo->addItem("amd64", MsvcToolChain::amd64);
m_varsBatArchCombo->addItem("arm", MsvcToolChain::arm); m_varsBatArchCombo->addItem("arm", MsvcToolChain::arm);
@@ -1338,12 +1338,12 @@ MsvcToolChainConfigWidget::MsvcToolChainConfigWidget(ToolChain *tc)
m_varsBatArchCombo->addItem("arm64_x86", MsvcToolChain::arm64_x86); m_varsBatArchCombo->addItem("arm64_x86", MsvcToolChain::arm64_x86);
m_varsBatArchCombo->addItem("arm64_amd64", MsvcToolChain::arm64_amd64); m_varsBatArchCombo->addItem("arm64_amd64", MsvcToolChain::arm64_amd64);
m_varsBatArgumentsEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); m_varsBatArgumentsEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
m_varsBatArgumentsEdit->setToolTip(tr("Additional arguments for the vcvarsall.bat call")); m_varsBatArgumentsEdit->setToolTip(Tr::tr("Additional arguments for the vcvarsall.bat call"));
hLayout->addWidget(m_varsBatPathCombo); hLayout->addWidget(m_varsBatPathCombo);
hLayout->addWidget(m_varsBatArchCombo); hLayout->addWidget(m_varsBatArchCombo);
hLayout->addWidget(m_varsBatArgumentsEdit); hLayout->addWidget(m_varsBatArgumentsEdit);
m_mainLayout->addRow(tr("Initialization:"), hLayout); m_mainLayout->addRow(Tr::tr("Initialization:"), hLayout);
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget); m_mainLayout->addRow(Tr::tr("&ABI:"), m_abiWidget);
addErrorLabel(); addErrorLabel();
setFromMsvcToolChain(); setFromMsvcToolChain();
@@ -1472,7 +1472,7 @@ void MsvcToolChainConfigWidget::handleVcVarsArchChange(const QString &)
QString MsvcToolChainConfigWidget::vcVarsArguments() const QString MsvcToolChainConfigWidget::vcVarsArguments() const
{ {
QString varsBatArg QString varsBatArg
= m_varsBatArchCombo->currentText() == tr("<empty>") = m_varsBatArchCombo->currentText() == Tr::tr("<empty>")
? "" : m_varsBatArchCombo->currentText(); ? "" : m_varsBatArchCombo->currentText();
if (!m_varsBatArgumentsEdit->text().isEmpty()) if (!m_varsBatArgumentsEdit->text().isEmpty())
varsBatArg += QLatin1Char(' ') + m_varsBatArgumentsEdit->text(); varsBatArg += QLatin1Char(' ') + m_varsBatArgumentsEdit->text();
@@ -1491,19 +1491,19 @@ ClangClToolChainConfigWidget::ClangClToolChainConfigWidget(ToolChain *tc) :
m_varsBatDisplayCombo->setObjectName("varsBatCombo"); m_varsBatDisplayCombo->setObjectName("varsBatCombo");
m_varsBatDisplayCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents); m_varsBatDisplayCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
m_mainLayout->addRow(tr("Initialization:"), m_varsBatDisplayCombo); m_mainLayout->addRow(Tr::tr("Initialization:"), m_varsBatDisplayCombo);
if (tc->isAutoDetected()) { if (tc->isAutoDetected()) {
m_llvmDirLabel = new QLabel(this); m_llvmDirLabel = new QLabel(this);
m_llvmDirLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); m_llvmDirLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
m_mainLayout->addRow(tr("&Compiler path:"), m_llvmDirLabel); m_mainLayout->addRow(Tr::tr("&Compiler path:"), m_llvmDirLabel);
} else { } else {
const QStringList gnuVersionArgs = QStringList("--version"); const QStringList gnuVersionArgs = QStringList("--version");
m_compilerCommand = new Utils::PathChooser(this); m_compilerCommand = new Utils::PathChooser(this);
m_compilerCommand->setExpectedKind(Utils::PathChooser::ExistingCommand); m_compilerCommand->setExpectedKind(Utils::PathChooser::ExistingCommand);
m_compilerCommand->setCommandVersionArguments(gnuVersionArgs); m_compilerCommand->setCommandVersionArguments(gnuVersionArgs);
m_compilerCommand->setHistoryCompleter("PE.Clang.Command.History"); m_compilerCommand->setHistoryCompleter("PE.Clang.Command.History");
m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand); m_mainLayout->addRow(Tr::tr("&Compiler path:"), m_compilerCommand);
} }
addErrorLabel(); addErrorLabel();
setFromClangClToolChain(); setFromClangClToolChain();
@@ -1697,7 +1697,7 @@ ClangClToolChain::ClangClToolChain()
: MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID) : MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID)
{ {
setDisplayName("clang-cl"); setDisplayName("clang-cl");
setTypeDisplayName(QCoreApplication::translate("ProjectExplorer::ClangToolChainFactory", "Clang")); setTypeDisplayName(Tr::tr("Clang"));
} }
bool ClangClToolChain::isValid() const bool ClangClToolChain::isValid() const
@@ -1820,7 +1820,7 @@ ClangClToolChain::BuiltInHeaderPathsRunner ClangClToolChain::createBuiltInHeader
MsvcToolChainFactory::MsvcToolChainFactory() MsvcToolChainFactory::MsvcToolChainFactory()
{ {
setDisplayName(MsvcToolChain::tr("MSVC")); setDisplayName(Tr::tr("MSVC"));
setSupportedToolChainType(Constants::MSVC_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::MSVC_TOOLCHAIN_TYPEID);
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID}); setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
setToolchainConstructor([] { return new MsvcToolChain(Constants::MSVC_TOOLCHAIN_TYPEID); }); setToolchainConstructor([] { return new MsvcToolChain(Constants::MSVC_TOOLCHAIN_TYPEID); });
@@ -2017,7 +2017,7 @@ Toolchains MsvcToolChainFactory::autoDetect(const ToolchainDetector &detector) c
ClangClToolChainFactory::ClangClToolChainFactory() ClangClToolChainFactory::ClangClToolChainFactory()
{ {
setDisplayName(ClangClToolChain::tr("clang-cl")); setDisplayName(Tr::tr("clang-cl"));
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID}); setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
setSupportedToolChainType(Constants::CLANG_CL_TOOLCHAIN_TYPEID); setSupportedToolChainType(Constants::CLANG_CL_TOOLCHAIN_TYPEID);
setToolchainConstructor([] { return new ClangClToolChain; }); setToolchainConstructor([] { return new ClangClToolChain; });
@@ -2153,9 +2153,7 @@ std::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils::E
QString command = QDir::toNativeSeparators(batchFile); QString command = QDir::toNativeSeparators(batchFile);
if (!batchArgs.isEmpty()) if (!batchArgs.isEmpty())
command += ' ' + batchArgs; command += ' ' + batchArgs;
return QCoreApplication::translate("ProjectExplorer::Internal::MsvcToolChain", return Tr::tr("Failed to retrieve MSVC Environment from \"%1\":\n%2")
"Failed to retrieve MSVC Environment from \"%1\":\n"
"%2")
.arg(command, message); .arg(command, message);
} }

View File

@@ -31,8 +31,6 @@ namespace Internal {
class MsvcToolChain : public ToolChain class MsvcToolChain : public ToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::MsvcToolChain)
public: public:
enum Type { WindowsSDK, VS }; enum Type { WindowsSDK, VS };
enum Platform { x86, amd64, x86_amd64, ia64, x86_ia64, arm, x86_arm, amd64_arm, amd64_x86, enum Platform { x86, amd64, x86_amd64, ia64, x86_ia64, arm, x86_arm, amd64_arm, amd64_x86,
@@ -139,8 +137,6 @@ protected:
class PROJECTEXPLORER_EXPORT ClangClToolChain : public MsvcToolChain class PROJECTEXPLORER_EXPORT ClangClToolChain : public MsvcToolChain
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::ClangClToolChain)
public: public:
ClangClToolChain(); ClangClToolChain();

View File

@@ -2,12 +2,13 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "osparser.h" #include "osparser.h"
#include "projectexplorerconstants.h"
#include "projectexplorertr.h"
#include "task.h" #include "task.h"
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
using namespace ProjectExplorer; namespace ProjectExplorer {
OsParser::OsParser() OsParser::OsParser()
{ {
@@ -21,7 +22,7 @@ Utils::OutputLineParser::Result OsParser::handleLine(const QString &line, Utils:
const QString trimmed = line.trimmed(); const QString trimmed = line.trimmed();
if (trimmed == QLatin1String("The process cannot access the file because it is " if (trimmed == QLatin1String("The process cannot access the file because it is "
"being used by another process.")) { "being used by another process.")) {
scheduleTask(CompileTask(Task::Error, tr( scheduleTask(CompileTask(Task::Error, Tr::tr(
"The process cannot access the file because it is being used " "The process cannot access the file because it is being used "
"by another process.\n" "by another process.\n"
"Please close all running instances of your application before " "Please close all running instances of your application before "
@@ -41,3 +42,5 @@ Utils::OutputLineParser::Result OsParser::handleLine(const QString &line, Utils:
} }
return Status::NotHandled; return Status::NotHandled;
} }
} // ProjectExplorer

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