Skip to content

Commit

Permalink
Language Editor: cool new features!
Browse files Browse the repository at this point in the history
1) Untranslated phrases can now be sorted by "type", e.g. "UI element", "status bar message", "tooltip", etc.  This allows translators with limited time to prioritize important phrases (UI elements) over less-important phrases (tooltips).

2) The language editor now lists the file(s) where a given phrase occurs.  This makes it much easier to infer and/or double-check context.

3) The above features are made possible by a new mini phrase "database" that stores per-phrase information.  The language file generator produces this db alongside the primary en-US language file.

4) The language editor now swaps between phrases much much *MUCH* faster.  (Hash tables are used to map between listbox indices and array indices, vs the naive search used before.)

Also included in this commit is a new German localization c/o Roy K.  Thank you, Roy!
  • Loading branch information
tannerhelland committed Aug 2, 2022
1 parent ca8b5bf commit e91936f
Show file tree
Hide file tree
Showing 18 changed files with 1,222 additions and 445 deletions.
73 changes: 54 additions & 19 deletions App/PhotoDemon/Languages/French.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>fr-FR</langid>
<langname>Français</langname>
<langversion>6.7.589</langversion>
<langversion>6.7.590</langversion>
<langstatus>Complete</langstatus>

<author>Jean Jacques Piedfort (orig. Frank Donckers)</author>
Expand Down Expand Up @@ -4742,11 +4742,6 @@ La valeur finale doit être entre %3 and %4.</translation>
<translation>taille</translation>
</phrase>

<phrase>
<original>(messages will appear here at run-time)</original>
<translation>(les messages apparaissent ici au moment de l'exécution)</translation>
</phrase>

<phrase>
<original>Fit the image on-screen</original>
<translation>Adapter l'image à l'écran</translation>
Expand All @@ -4772,7 +4767,7 @@ La valeur finale doit être entre %3 and %4.</translation>
<translation>Changer l'unité de taille de l'image (affichée à gauche de cette boîte)</translation>
</phrase>

<!-- pdStatusBar.ctl contains 9 phrases. 2 were duplicates of existing phrases, so only 7 new phrases were written to file. -->
<!-- pdStatusBar.ctl contains 8 phrases. 2 were duplicates of existing phrases, so only 6 new phrases were written to file. -->

<phrase>
<original>PhotoDemon by Tanner Helland - www.photodemon.org</original>
Expand Down Expand Up @@ -12717,11 +12712,26 @@ Vous pouvez alors si besoin
<translation></translation>
</phrase>

<phrase>
<original>UI elements</original>
<translation></translation>
</phrase>

<phrase>
<original>replace translation with reference text (Ctrl+U)</original>
<translation></translation>
</phrase>

<phrase>
<original>list of phrases (%1 items)</original>
<translation>liste des phrases ( %1 items)</translation>
</phrase>

<phrase>
<original>phrase groups</original>
<translation></translation>
</phrase>

<phrase>
<original>Save this translation and proceed to the next phrase</original>
<translation>Sauvegarder cette traduction et passer à la phrase suivante</translation>
Expand All @@ -12738,27 +12748,52 @@ Vous pouvez alors si besoin
</phrase>

<phrase>
<original>phrase groups</original>
<original>Auto-translate all missing phrases</original>
<translation></translation>
</phrase>

<phrase>
<original>list of phrases (%1 items)</original>
<translation>liste des phrases ( %1 items)</translation>
<original>reference translation from .po file</original>
<translation></translation>
</phrase>

<phrase>
<original>Auto-translate all missing phrases</original>
<original>(NOTE: CTRL+ENTER automatically saves and proceeds to next phrase.)</original>
<translation></translation>
</phrase>

<phrase>
<original>reference translation from .po file</original>
<original>phrase types</original>
<translation></translation>
</phrase>

<phrase>
<original>(NOTE: CTRL+ENTER automatically saves and proceeds to next phrase.)</original>
<original>action names</original>
<translation></translation>
</phrase>

<phrase>
<original>message boxes</original>
<translation></translation>
</phrase>

<phrase>
<original>status bar messages</original>
<translation></translation>
</phrase>

<phrase>
<original>tooltips</original>
<translation></translation>
</phrase>

<phrase>
<original>files where this phrase occurs</original>
<translation></translation>
</phrase>

<phrase>
<original>miscellaneous</original>
<translation></translation>
</phrase>

Expand Down Expand Up @@ -12998,7 +13033,7 @@ Pour continuer, veuillez télécharger une nouvelle copie de PhotoDemon de photo
<translation></translation>
</phrase>

<!-- Tools_LanguageEditor.frm contains 101 phrases. 45 were duplicates of existing phrases, so only 56 new phrases were written to file. -->
<!-- Tools_LanguageEditor.frm contains 108 phrases. 44 were duplicates of existing phrases, so only 64 new phrases were written to file. -->

<phrase>
<original>Create macro from session history</original>
Expand Down Expand Up @@ -13931,12 +13966,12 @@ Si vous choisissez de désactiver les mises à jour, n'oubliez pas de visiter ph

<!-- Tools_ScreenVideoPrefs.frm contains 19 phrases. 9 were duplicates of existing phrases, so only 10 new phrases were written to file. -->

<!-- Automatic text extraction complete. -->
<!-- Automatic text generation complete. -->

<phrasecount>2633</phrasecount>
<phrasecount>2640</phrasecount>

<!-- As of this build, PhotoDemon contains 5509 phrases. -->
<!-- 2876 are duplicates, so only 2633 unique phrases have been written to file. -->
<!-- These 2633 phrases contain approximately 11409 total words. -->
<!-- As of this build, PhotoDemon contains 5515 phrases. -->
<!-- 2875 are duplicates, so only 2640 unique phrases have been written to file. -->
<!-- These 2640 phrases contain approximately 11421 total words. -->

</pdData>
83 changes: 59 additions & 24 deletions App/PhotoDemon/Languages/German.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>de-DE</langid>
<langname>Deutsch (German)</langname>
<langversion>9.0.1683</langversion>
<langversion>9.0.1701</langversion>
<langstatus>Up-to-date</langstatus>

<author>rk (ehem. Frank Donckers, Helmut Kuerbiss)</author>
Expand Down Expand Up @@ -4444,7 +4444,7 @@ Sie werden diese Datei unter Verwendung Ihres Internet-Browsers manuell herunter

<phrase>
<original>This button will open a new issue page in your web browser. You will need a GitHub account to proceed.</original>
<translation></translation>
<translation>Dieser Button wird eine neue Issue-Seite in Ihrem Webbrowser öffnen. Sie benötigen einen GitHub-Account, um fortzufahren.</translation>
</phrase>

<phrase>
Expand Down Expand Up @@ -4744,11 +4744,6 @@ Der finale Wert muss zwischen %3 und %4 liegen.</translation>
<translation>Größe</translation>
</phrase>

<phrase>
<original>(messages will appear here at run-time)</original>
<translation>(Nachrichten werden bei Laufzeit hier erscheinen)</translation>
</phrase>

<phrase>
<original>Fit the image on-screen</original>
<translation>Anpassen des Bildes auf dem Screen</translation>
Expand All @@ -4774,7 +4769,7 @@ Der finale Wert muss zwischen %3 und %4 liegen.</translation>
<translation>Die links von dieser Box angezeigte Bildgrößeneinheit ändern</translation>
</phrase>

<!-- pdStatusBar.ctl contains 9 phrases. 2 were duplicates of existing phrases, so only 7 new phrases were written to file. -->
<!-- pdStatusBar.ctl contains 8 phrases. 2 were duplicates of existing phrases, so only 6 new phrases were written to file. -->

<phrase>
<original>PhotoDemon by Tanner Helland - www.photodemon.org</original>
Expand Down Expand Up @@ -12711,34 +12706,39 @@ Möchten Sie Ihre Batchliste vor dem Beenden speichern?</translation>
<translation>Klicken Sie hier für detaillierte Instruktionen (in Englisch)</translation>
</phrase>

<phrase>
<original>UI elements</original>
<translation></translation>
</phrase>

<phrase>
<original>replace translation with reference text (Ctrl+U)</original>
<translation>Übersetzung durch Referenztext ersetzen (Strg+U)</translation>
</phrase>

<phrase>
<original>Save this translation and proceed to the next phrase</original>
<translation>Diese Übersetzung speichern und mit der nächsten Phrase fortfahren</translation>
<original>list of phrases (%1 items)</original>
<translation>Liste der Phrasen (%1 Items)</translation>
</phrase>

<phrase>
<original>translated phrase</original>
<translation>Übersetzte Phrase</translation>
<original>phrase groups</original>
<translation>Phrasengruppen</translation>
</phrase>

<phrase>
<original>original phrase</original>
<translation>Original-Phrase</translation>
<original>Save this translation and proceed to the next phrase</original>
<translation>Diese Übersetzung speichern und mit der nächsten Phrase fortfahren</translation>
</phrase>

<phrase>
<original>phrase groups</original>
<translation>Phrasengruppen</translation>
<original>translated phrase</original>
<translation>Übersetzte Phrase</translation>
</phrase>

<phrase>
<original>list of phrases (%1 items)</original>
<translation>Liste der Phrasen (%1 Items)</translation>
<original>original phrase</original>
<translation>Original-Phrase</translation>
</phrase>

<phrase>
Expand All @@ -12756,6 +12756,41 @@ Möchten Sie Ihre Batchliste vor dem Beenden speichern?</translation>
<translation>(HINWEIS: STRG+ENTER speichert automatisch und fährt mit nächster Phrase fort.)</translation>
</phrase>

<phrase>
<original>phrase types</original>
<translation></translation>
</phrase>

<phrase>
<original>action names</original>
<translation></translation>
</phrase>

<phrase>
<original>message boxes</original>
<translation></translation>
</phrase>

<phrase>
<original>status bar messages</original>
<translation></translation>
</phrase>

<phrase>
<original>tooltips</original>
<translation></translation>
</phrase>

<phrase>
<original>files where this phrase occurs</original>
<translation></translation>
</phrase>

<phrase>
<original>miscellaneous</original>
<translation></translation>
</phrase>

<phrase>
<original>copy system locale</original>
<translation>System-Locale kopieren</translation>
Expand Down Expand Up @@ -12994,7 +13029,7 @@ Um fortzusetzen, laden Sie bitte eine neue Version von PhotoDemon von photodemon
<translation>(autom. gespeichert um/am %1)</translation>
</phrase>

<!-- Tools_LanguageEditor.frm contains 101 phrases. 45 were duplicates of existing phrases, so only 56 new phrases were written to file. -->
<!-- Tools_LanguageEditor.frm contains 108 phrases. 44 were duplicates of existing phrases, so only 64 new phrases were written to file. -->

<phrase>
<original>Create macro from session history</original>
Expand Down Expand Up @@ -13918,12 +13953,12 @@ Wenn Sie sich dennoch dafür entscheiden, Updates zu deaktivieren, vergessen Sie

<!-- Tools_ScreenVideoPrefs.frm contains 19 phrases. 9 were duplicates of existing phrases, so only 10 new phrases were written to file. -->

<!-- Automatic text extraction complete. -->
<!-- Automatic text generation complete. -->

<phrasecount>2633</phrasecount>
<phrasecount>2640</phrasecount>

<!-- As of this build, PhotoDemon contains 5509 phrases. -->
<!-- 2876 are duplicates, so only 2633 unique phrases have been written to file. -->
<!-- These 2633 phrases contain approximately 11409 total words. -->
<!-- As of this build, PhotoDemon contains 5515 phrases. -->
<!-- 2875 are duplicates, so only 2640 unique phrases have been written to file. -->
<!-- These 2640 phrases contain approximately 11421 total words. -->

</pdData>
Loading

0 comments on commit e91936f

Please sign in to comment.