Translation of tags into Russian

Started by IWTA, June 28, 2019, 09:37:04 AM

Previous topic - Next topic

IWTA

QuoteI know this isn't always the case, but in an ideal world this would be true.

In an ideal world, there would be only one language. But then translations will not be necessary. And we live in a REAL WORLD, where there are many different languages ​​with their own characteristics.
If in one language one word is applied to one concept, then in another language several words are used to define the same concept. For example, the word "Name", in Russian, has two translation options:
   a) Имя (Name) - this word applies only to a person.
   b) Название (Name) - this word is applicable only to inanimate objects.
Therefore, if only one version of the word "Name" falls into the Russian translation, in other places the translation will be incorrect. Such cases are not isolated. And the reason for the incorrect translation will be - the current implementation of the translation with its limitations, which you wrote about.

The second problem is that in an effort to call tags as short as possible, standard developers often use only one word to define a tag, and still manage to duplicate tags of the same name. For example, only in one section of DJVU there are two tags at once under the same name "Author". In the first case, this is the person who created this djvu file. In another tag under the same name "Author" is meant the person who wrote this book. You can determine where to write a person if two tags have the same name? THIS CAUSES CONFUSION. If there were no current restrictions on the translation, then the word "Author" can be added with a clarifying word. In the first case there will be a "Author of the file" (but the "Creator of the file" will be better), and in the second case there will be a "Author of the book". Then everything will be clear. But as you wrote, now this is impossible, but it is sad. :(

The third problem is that the translator is not always able to check (even with all the desire) to write the same translation for tags of the same name. Then, both you and the translator will CONSTANTLY have to catch different translations of the tags of the same name and correct them. I doubt that it adds joy.

The fourth unpleasant moment. Localization files in the current implementation are stitched into exiftool.exe file code. This is one of the main reasons why there are still no complete translations of all tags. Now for translation you must first extract all the tags in the .xml file. Translate all the tags, taking into account the restrictions on the translation, then send them to you, then you convert it to another format, and only then stitch it back into the exiftool.exe file. If the localization file were in text format (or at least in the same form - .xml) and lay next to exiftool.exe, this would greatly simplify the work of translating the program into different languages. Practice confirms my words. Most programs with localized files in the code are not translated. And programs in which localization files lie next to the program in text format almost all are translated into many languages. Understanding this, most developers make localization files as separate files that everyone can translate or edit.

Summarizing all the above, how justified is the current implementation of the translation of tags into other languages ​​given all the limitations ??? Reducing the size of the output localization file is an unnecessary sacrifice when the quality of the translation suffers.

I am very much asking for this (very much), please make a concession - remove restrictions on translation. Ideal would be a separate localization file that the program could use to display tags in different languages. The exiftool.exe file itself will lose weight and ease it, and users can delete unnecessary language files. Why extra files?
As for the Russian translation, for my part, I will do everything in my power.

Hayo Baan

Interesting discussion! (And thank you for the effort you put into the translation!)

The way exiftool as .exe currently works does not allow it to be using separate files. In fact it already is separate files; exiftool.exe unpacks itself right before execution into a built-in perl and the exiftool code files.
This should actually allow you to make your changes in the unpacked version and have them used in every execution of exiftool thereafter. No need to ask for some special way of handling the translation files, I think (Phil, please correct me if I'm wrong).

Now for the need of multiple translations for same-named tags. Yes, I agree with you here. But since this likely requires quite a big change on the code part for Phil, perhaps this one has to be put down for a while...
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Quote from: IWTA on July 01, 2019, 03:54:58 AM
For example, the word "Name", in Russian, has two translation options:
   a) Имя (Name) - this word applies only to a person.
   b) Название (Name) - this word is applicable only to inanimate objects.

Then the tag names should be ObjectName and PersonName to avoid this problem.

QuoteLocalization files in the current implementation are stitched into exiftool.exe file code.

They are actually separate modules as StarGeek mentioned, but the Windows .exe version packages all the modules.

I agree that translating with the XML is too difficult.  The language support was added more than 10 years ago when there were far fewer tags and fewer file types supported.  Back then it was easier to add a language.

The current design of allowing only a single description for a given tag name does have limitations as you mention, but it has the advantage that translations are made automatically for same-named tags when I add new tags later.  Also, the language module is much more compact because there is no duplication (unlike the XML file).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

obetz

#18
Quote from: Phil Harvey on July 02, 2019, 07:13:17 AM
QuoteLocalization files in the current implementation are stitched into exiftool.exe file code.

They are actually separate modules as StarGeek mentioned, but the Windows .exe version packages all the modules.

after running ExifTool the first time, the components can be edited in %temp%\par...\cache-exiftool-11.xx

The temp folder is not a safe location, so frequent backups are suitable.

As an alternative, my installable version is available at https://oliverbetz.de/ExifTool_install_11.54.exe

Oliver

StarGeek

Quote from: Phil Harvey on July 02, 2019, 07:13:17 AM
...as StarGeek mentioned...

Oh don't go dragging me into this.  I can say "I don't know" and "I don't understand" in Russian in case I get captured by the FSB, but that's all that stuck from my Russian language class back in the early 90s.  ;)
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

IWTA

1) Did I understand you correctly, that if necessary I can change the name of the tag myself? Need to edit in the place where I highlighted in red?

<tag id='Title' name='Title' type='?' writable='false'>

2) If there is a need to change the name of the tag, should I ask your permission for this change every time?

3) Could you generate a list of tag names that consist of only one word and repeat two or more times. And sort this list by the number of repetitions with the number of repetitions. It can be done? This list will help to pay attention to such tag names when translating.

4) Phil. Special thanks to you for the file you posted - ru.pm. Already saw what needs to be corrected in the translation.

5) What team you get a list of different translation tags of the same name? It is not difficult to do? I have no experience with the command line.

Phil Harvey

Quote from: IWTA on July 02, 2019, 04:00:24 PM
1) Did I understand you correctly, that if necessary I can change the name of the tag myself?

No.  That would be up to me to rename the tag.  I'm just saying that the tag names may not be ideal, but fixing this is more realistic than getting everyone to speak the same language.

I don't have much time now so I'll answer your other questions later.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

IWTA

Quote from: obetz on July 02, 2019, 12:36:40 PM
As an alternative, my installable version is available at https://oliverbetz.de/ExifTool_install_11.54.exe

Oliver
Thanks for the link. And how is your version different from the official one?
I put the installed files in the ExifToolGUI directory. Now I can, if necessary, correct translation errors and immediately see the result of the changes.  8)

Phil Harvey

Just FYI, I am updating the exiftool documentation to suggest an easier way to submit a language translation, although it requires Perl to run the "import.pl" script.  The original technique has become too cumbersome with the number of tags that ExifTool now supports, especially with all of the duplication.

Currently, the language support is not complete, but users are welcome to
help improve this by submitting their own translations.  To submit a
translation, follow these steps (you must have Perl installed for this):

1. Download and unpack the latest Image-ExifTool full distribution.

2. 'cd' into the Image-ExifTool directory.

3. Run this command to make an XML file of the desired tags (eg. EXIF):

   ./exiftool -listx -exif:all > out.xml

4. Copy this text into a file called 'import.pl' in the exiftool directory:

    push @INC, 'lib';
    require Image::ExifTool::TagInfoXML;
    my $file = shift or die "Expected XML file name\n";
    $Image::ExifTool::TagInfoXML::makeMissing = shift;
    Image::ExifTool::TagInfoXML::BuildLangModules($file,8);

5. Run the 'import.pl' script to Import the XML file, generating the
'MISSING' entries for your language (eg. Russian):

   perl import.pl out.xml ru

6. Edit the generated language module lib/Image/ExifTool/Lang/ru.pm, and
search and replace all 'MISSING' strings in the file with your translations.

7. Email the module ('ru.pm' in this example) to philharvey66 at gmail.com

8. Thank you!!


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

IWTA

I do the translation of tags by editing the .xml file in ETTrans.exe.
Are there any advantages of the proposed method?

Phil Harvey

#25
Quote from: IWTA on July 02, 2019, 04:00:24 PM
3) Could you generate a list of tag names that consist of only one word and repeat two or more times. And sort this list by the number of repetitions with the number of repetitions. It can be done? This list will help to pay attention to such tag names when translating.

I can't do that, but I have suggested an improved translation technique in my last post that avoids all of the duplication.

Quote5) What team you get a list of different translation tags of the same name? It is not difficult to do? I have no experience with the command line.

The 'import.pl' script I posted will generate these messages when importing the XML file.

Quote from: IWTA on July 03, 2019, 07:49:26 AM
I do the translation of tags by editing the .xml file in ETTrans.exe.
Are there any advantages of the proposed method?

It avoids all of the duplication and makes it very easy to find the missing entries.  It also allows you to immediately test the translations.  You may be able to use ETTrans.exe for this procedure.

A disadvantage would be that improving existing translations for a given type of metadata would be more difficult by editing the language module (since the module contains a mix of all metadata types), but with this method you can also edit the XML file if you want to do this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

IWTA

Translated the entire "File" section, just a few lines left:

MD Item - User Shared Received Date
MD Item - User Shared Received Recipient
MD Item - User Shared Received Recipient Handle
MD Item - User Shared Received Sender
MD Item - User Shared Received Sender Handle
MD Item - User Shared Received Transport


I know each word individually, but I find it difficult to add up one sentence in this case.  :(
Can someone tell me?

StarGeek

These are MacOS system tags.  I don't know anything more about them as I don't use a Mac but maybe that will give you an idea for some searches if you don't want to wait for someone with more info to post.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Honestly, I don't know anything about these tags other than the names that Apple gives them.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

obetz

Quote from: Phil Harvey on July 03, 2019, 07:35:17 AM
Currently, the language support is not complete, but users are welcome to
help improve this by submitting their own translations.  To submit a
translation, follow these steps (you must have Perl installed for this):

my "installable" version can also run import.pl

a small cosmetic issue is that perl_orig.exe must be called in the current package:


perl_orig exiftool.pl -listx -exif:all > out.xml
perl_orig.exe import.pl out.xml ru


I consider to rename this back to perl.exe

Quote from: IWTA on July 02, 2019, 04:54:10 PM
Thanks for the link. And how is your version different from the official one?

It uses Strawberry Perl (stripped), and it doesn't use the PAR/pp packer. I made a small launcher (exiftool.exe) to make the invocation compatible.

Oliver