Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/.build/lessmsi.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<!-- TheCulture is MSBuild's so-called "Item Metadata". See https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-items?view=vs-2022&source=recommendations#item-metadata -->
<TheCulture>ko</TheCulture>
</DeployFiles>
<DeployFiles Include="$(RootDir)\LessMsi.Gui\bin\Release\zh-TW\lessmsi-gui.resources.dll">
<!-- TheCulture is MSBuild's so-called "Item Metadata". See https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-items?view=vs-2022&source=recommendations#item-metadata -->
<TheCulture>zh-TW</TheCulture>
</DeployFiles>
<DeployFiles Include="$(RootDir)\packages\libmspack4n.0.9.10\lib\net40\libmspackn.dll"></DeployFiles>
<DeployFiles Include="$(RootDir)\packages\libmspack4n.0.9.10\build\x86\mspack.dll"></DeployFiles>
<DeployFiles Include="$(RootDir)\packages\LessIO.1.0.34\lib\net40\LessIO.dll"></DeployFiles>
Expand Down
3 changes: 2 additions & 1 deletion src/LessMsi.Gui/LessMsi.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@
<EmbeddedResource Include="Resources\Languages\Strings.pl.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.pt.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.es.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.sq.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.sq.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.ko.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.zh-TW.resx" />
<EmbeddedResource Include="Resources\Languages\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
Expand Down
2 changes: 1 addition & 1 deletion src/LessMsi.Gui/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private void InitializeComponent()
this.lblFile.AutoSize = true;
this.lblFile.Name = "lblFile";
this.lblFile.TabIndex = 1;
this.lblFile.Text = $"{Strings.File}:";
this.lblFile.Text = $"{Strings.File}";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather have the : be present in this one line, instead of adding it in any translation file.
Please add it back and amend the translation files.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mega5800, not all languages uses the same set of puncture marks. For Trad Chinese, we use full-width (U+FF1A), instead of half-width ones (U+003A).

Concating strings, or adding more texts before or after strings are usually a bad idea either, as translators are lack of contexts (what is going to be injected in runtime) and causing localizability issues sometimes. See more in the next comment reply for SameDirMassage.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your point, but the difference between U+FF1A & U+003A is too small, and in my opinion is not worth changing the existing translations files.

@activescott, any thoughts on this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colons may be just trivial, the key reason to change is to do proper i18n and respect locale styles and customs.

There are other puncture marks do look different from English, full stops, quote marks, and so on. Quick quote:

  • French require extra space before and after all marks
  • Greek use different symbol for colons

We should just let localizers to decide what is more appropriate in their locale/language.

and in my opinion is not worth changing the existing translations files.

This is replied in #266 (comment). I am just moving colons into these resource files based on their locale usage, not using full-width ones except zh-TW, so UI Views are not actually changed for String File.

this.lblFile.Margin = new Padding(13, 0, 0, 0);
this.lblFile.Anchor = System.Windows.Forms.AnchorStyles.Left;
//
Expand Down
9 changes: 4 additions & 5 deletions src/LessMsi.Gui/PreferencesForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ void AddRemoveShortcut(bool isAdding, string commandName, string fileClass, stri
if (!File.Exists(shortcutHelperExe))
{
MessageBox.Show(this,
$"{Strings.File} '" + Path.GetFileNameWithoutExtension(shortcutHelperExe) +
$"' {Strings.SameDirMassage} lessmsi-gui.exe.",
Strings.MissingFile,
MessageBoxButtons.OK,
MessageBoxIcon.Error);
string.Format(Strings.ShortcutHelperMissing, Path.GetFileNameWithoutExtension(shortcutHelperExe), "lessmsi-gui.exe"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change necessary?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendered full sentence in zh-TW translation is 檔案 Path.GetFileNameWithoutExtension(shortcutHelperExe) 應該位於相同資料夾 lessmsi-gui.exe. but this does comply with Chinese grammar, and does not sound natural.

A more appropriate translation should be ShortcutHelperMissing as proposed in this PR, 「{0}」檔案應該與「{1}」位於相同資料夾。, so filenames are injected in strings as placeholders, and localizers can adjust sentence order, based on the grammar of their target language.

Strings.MissingFile,
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
var newProcess = new Process();
Expand Down
20 changes: 10 additions & 10 deletions src/LessMsi.Gui/Resources/Languages/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Stream-Dateien extrahieren...</value>
</data>
<data name="File" xml:space="preserve">
<value>Datei</value>
<value>Datei:</value>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change for all the translation files.
I'd rather have one : at the corresponding code line, rather than adding it to any translation file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These colons are added based on reason in #266 (comment) colons are added based on usage in other strings, so translators of each locale do not have to submit changes again.

</data>
<data name="FileExistError" xml:space="preserve">
<value>Datei '{0}' existiert nicht</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Entfernt das Kontextmenü, falls vorhanden</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>sollte im selben Verzeichnis liegen wie</value>
</data>
<data name="Search" xml:space="preserve">
<value>Suche:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Tabelle kann nicht angezeigt werden</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding English text to a translation file is a wrong thing to do.
I understand that you might not speak all these languages to provide a proper translation.

And again, why do we need this text in the app?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShortcutHelperMissing is added to all language resource files as new string is added to replace original SameDirMassage. I can remove if missing new-added strings can fall back to English and it does not break building or runtime though.

<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Extrayendo archivos del flujo de datos...</value>
</data>
<data name="File" xml:space="preserve">
<value>Archivo</value>
<value>Archivo:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>El archivo '{0}' no existe</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Elimina el menú contextual si existe</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>debe estar en el mismo directorio que</value>
</data>
<data name="Search" xml:space="preserve">
<value>Buscar:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>No se puede ver la tabla</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Extraire des fichiers de flux...</value>
</data>
<data name="File" xml:space="preserve">
<value>Fichier</value>
<value>Fichier:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>Le fichier '{0}' n'existe pas</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Supprime le menu contextuel s'il existe</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>doit être dans le même répertoire que</value>
</data>
<data name="Search" xml:space="preserve">
<value>Recherche:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Impossible de visualiser la table</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Estrai file flussi...</value>
</data>
<data name="File" xml:space="preserve">
<value>File</value>
<value>File:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>File '{0}' non esiste</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Rimuovi se esistono voci menu contestuale explorer</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>deve essere nella stessa cartella di</value>
</data>
<data name="Search" xml:space="preserve">
<value>Cerca:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Impossibile visualizzare la tabella</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
10 changes: 5 additions & 5 deletions src/LessMsi.Gui/Resources/Languages/Strings.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>ストリームファイルの抽出...</value>
</data>
<data name="File" xml:space="preserve">
<value>ファイル</value>
<value>ファイル :</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>ファイル '{0}' は存在しません</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>コンテキストメニューが存在する場合は削除します</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>同じディレクトリにある必要があります</value>
</data>
<data name="Search" xml:space="preserve">
<value>検索 :</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>テーブルを表示できません</value>
</data>
</root>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.ko.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>스트림 파일 추출...</value>
</data>
<data name="File" xml:space="preserve">
<value>파일</value>
<value>파일:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>'{0}' 파일이 존재하지 않습니다</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>컨텍스트 메뉴가 있는 경우 해당 메뉴 제거</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>다음 디렉터리와 동일해야 합니다</value>
</data>
<data name="Search" xml:space="preserve">
<value>검색:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>테이블을 볼 수 없습니다</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Wypakuj pliki strumienia...</value>
</data>
<data name="File" xml:space="preserve">
<value>Plik</value>
<value>Plik:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>Plik '{0}' nie istnieje</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Usuwa opcje menu kontekstowego, jeśli istnieją</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>powinien znajdować się w tym samym katalogu co</value>
</data>
<data name="Search" xml:space="preserve">
<value>Szukaj:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Nie można wyświetlić tabeli</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.pt.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Extrair arquivos de fluxo...</value>
</data>
<data name="File" xml:space="preserve">
<value>Arquivo</value>
<value>Arquivo:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>O arquivo '{0}' não existe</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Remove o menu de contexto se ele existir</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>deve estar na mesma pasta que</value>
</data>
<data name="Search" xml:space="preserve">
<value>Pesquisar</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Não é possível visualizar a tabela</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Extract Stream Files...</value>
</data>
<data name="File" xml:space="preserve">
<value>File</value>
<value>File:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>File '{0}' does not exist</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Removes the context menu if it exists</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>should be in the same directory as</value>
</data>
<data name="Search" xml:space="preserve">
<value>Search:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Cannot view table</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
8 changes: 4 additions & 4 deletions src/LessMsi.Gui/Resources/Languages/Strings.sq.resx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Nxirr Skedarët nga Rrjedha...</value>
</data>
<data name="File" xml:space="preserve">
<value>Skedari</value>
<value>Skedari:</value>
</data>
<data name="FileExistError" xml:space="preserve">
<value>Skedari '{0}' nuk ekziston</value>
Expand Down Expand Up @@ -243,9 +243,6 @@
<data name="RemoveShortcutTextNote" xml:space="preserve">
<value>Heq menunë kontekstuale nëse ekziston</value>
</data>
<data name="SameDirMassage" xml:space="preserve">
<value>duhet të jetë në të njëjtën direktori me</value>
</data>
<data name="Search" xml:space="preserve">
<value>Kërko:</value>
</data>
Expand Down Expand Up @@ -300,4 +297,7 @@
<data name="ViewTableError" xml:space="preserve">
<value>Nuk mund të shihet tabela</value>
</data>
<data name="ShortcutHelperMissing" xml:space="preserve">
<value>File '{0}' should be in the same directory as '{1}'.</value>
</data>
</root>
Loading