hvdwolf / jExifToolGUI

jExifToolGUI is a multi-platform java/Swing graphical frontend for the excellent command-line ExifTool application by Phil Harvey
https://hvdwolf.github.io/jExifToolGUI/
GNU General Public License v3.0
461 stars 38 forks source link

Convenient localization (translation) using Weblate #124

Closed KovalevArtem closed 2 years ago

KovalevArtem commented 3 years ago

I suggest using Weblate or any other service. It is completely free for open source projects. image Using a translation service like Weblate greatly simplifies both the translation process and keeping it up to date. This speeds up translation of the project into more languages, as the service has many volunteers who join new projects. Makes the life of the translator easier. And it provides many other features. image

❗️ This is by no means an advertisement for Weblate. In my opinion, this service is best suited for translating open-source projects, because it has open source code itself...

I am ready to help in the translation into Russian.

mrtngrsbch commented 3 years ago

hi @KovalevArtem, I would love to see jExifToolGUI in Russian ! the translation system is very easy. It is only 2 files.

Your proposal is very interesting, but I estimate that it implies a costly change at this time. I'm sure @hvdwolf will ask us for more resources with the code.

hvdwolf commented 3 years ago

Actually the base translation files are "program_strings.properties" and "program_help_texts.properties", which would require the ru_RU extension (I suppose).

I know weblate and have looked at it and it also has my preference (I am also translator in ~10 other projects where about half of them do use weblate). There are a few other open source options as well, but all give quite some overhead for the developer to configure it. If it is a team of developers, one of them can have a look at it. Currently I am the only developer and with only a few languages currently, I do not want to invest the time into it. Although I did not do anything the last 5 months due to an overload of work, I am still in "active development" of the tool. I want to do two more development cycles until I am satisfied with what I want (that doesn't mean others are satisifed). Then I will certainly go to weblate or one of the others, but not yet.

hvdwolf commented 3 years ago

Weblate as hosted service is no longer free, the software is. Only when I self-host it, it is still free. When I use the cloud-based version I have to pay for it and even the cheapest paid version is much more than I get on donations. I don't mind to get hardly any money out of it, but I am certainly not going to pay for it. Crowdin Open Source is the other one I was looking at and that is still free of charge for Open Source projects.

KovalevArtem commented 3 years ago

@comradekingu Is it really?

mrtngrsbch commented 3 years ago

Free only I know https://launchpad.net/ and Poeditor is free up to 1 000 Strings https://poeditor.com/

Obviously I am not including the cost of this implementation for a supposed improvement to the current system, which is very simple.

comradekingu commented 3 years ago

@KovalevArtem @hvdwolf Hosted Weblate is a commercial service, but can be had free of charge if these conditions (for libre projects) are met https://hosted.weblate.org/hosting/ Crowdin is only free of charge for non-commercial software, which is worse, and the product is worse, and the terms are way worse. POEditor is closed source, and Launchpad makes more sense if the code is hosted there.

hvdwolf commented 3 years ago

With poeditor the first 1000 strings are free. I am currently at 669. I probably don't need another 331 strings, but you never know. With regard to Launchpad: It only seems to support .po and .mo translatable files. It seems to be a webbased version of "po edit". They are really developed for C/C++ on unix, although that was easily migrated to MacOS and Windows. Unfortunately that format is incompatible with the java development environments.

comradekingu commented 3 years ago

https://weblate.bubu1.eu/ is free for libre software.

hvdwolf commented 3 years ago

OK. I started my first project. It is still in the trial period where I am waiting for approval whether this is a true open source Libre project. You can find it here: https://hosted.weblate.org/projects/jexiftoolgui/program_strings/

I also need to add the help_texts, but that is step 2.

I still need to dive into a lot of things, like automatic pushing of the translations, squashed git commits, and other extensions.

comradekingu commented 3 years ago

@hvdwolf Good stuff. I started the nb_NO translation. Also had a go at https://github.com/hvdwolf/jExifToolGUI/pull/130/files You can add "kingu" as an admin and I can help.

Reusing translations from identical fields would help a lot, since there is a lot of repetition. :)

hvdwolf commented 3 years ago

I added you as user. Is that different from admin? Also: You started nb_NO but when I pulled in your pull request, it turned out that the filename is "program_strings_nb-NO.properties" instead of "program_strings_nbNO.properties" (- versus ). So I did a "git mv" locally (as I could not find how to do that in weblate), and pushed it back to the github repo.

I have properties files with short strings, "the program_strings" and I have files which contain longer help texts, the "program_help_texts". I tried to add them as well, but somehow I was unsuccessful. Of course this is due to my inexperience as I see multiple projects (and helped translating in multiple projects) having these multi-localization files.

Edit: I just managed to add the help_texts

comradekingu commented 3 years ago

It is an user with admin privileges. https://hosted.weblate.org/addons/jexiftoolgui/program_strings/ I added "Clear up translation files" and "Add missing languages" (adds missing components in all present languages).

Don't know how PRs are coming in without the webhook / Push address set up…? Guess the Weblate user is part of the team here.

This plugin https://docs.weblate.org/no/latest/admin/addons.html#addon-weblate-git-squash might be useful? Or the "Mass edit" one, and then adding the "safe-html" flag to all strings that are parsed as such.

Other than that I think it is good to go, so I can ask for it to be approved?

hvdwolf commented 3 years ago

The addons are OK with me, but I did not really understand the "Add missing languages". Does that check my github repository for new proerpteis files , and when available import them into weblate? Or the other way around?

The last commit had a massive number of conflicts and it took me a very long time to work through the conflicts. I used strings from both the master and weblate.

I did see that you replaced some " \" line enters with
. I use both html encoded strings and ascii strings. The ascii strings have the " \" end-of-line. When you add a \<br> there they do not work properly anymore in the programme and corrupt the screen. I will take a look where it will go wrong. Please do not replace " \" characters with \<br>

hvdwolf commented 3 years ago

Sorry. I was wrong. This " \" is necessary to prevent long lines in the properties files. In weblate that is no longer necessary.

It still means I need to check and correct also in the other languages.

comradekingu commented 3 years ago

"Add missing languages" adds for example https://hosted.weblate.org/projects/jexiftoolgui/glossary/ if https://hosted.weblate.org/projects/jexiftoolgui/help-texts/ or https://hosted.weblate.org/projects/jexiftoolgui/program_strings/ is present, (or similar). So for any language that has anything, it will have all (currently 3) components added. Not sure how the integration works. Do you have to add files here in addition to that?

There is a plugin to check the Git repo for stuff to add automatically. I suppose the website and manual are candidates. I don't think there is anything untowards in https://github.com/hvdwolf/jExifToolGUI/pull/136 so hopefully no more fails. (He said, too confidently.) Only the <br> are shown in Weblate. Would be nice to split translation strings there, long translations are quite grim to get through.

hvdwolf commented 3 years ago

Would be nice to split translation strings there, long translations are quite grim to get through.

As such I agree, but I do have some longer texts and especially if you need to explain something it gets really hard for a translator as well to split it over multiple sub translation tags. It is "struggling" with one long string, or "struggling" to get a multi-sub-line nicely translated over multiple strings with changes in grammar and sentence structure in other languages.

hvdwolf commented 3 years ago

Another question. This morning I looked at the repository. I see image

What is now the preferred order to "fix" this. First pull the missing commits? Then commit the pending changes? Then push the outgoing commits?

mrtngrsbch commented 3 years ago

FYI: I have been doing a lot of translations in the ES networks...

hvdwolf commented 3 years ago

Hi Martin,

sorry, but what do you mean with "in the ES networks..."? For other projects? Here on weblate? here on weblate for JTG?

mrtngrsbch commented 3 years ago

Sorry for writing fast. I meant i have done many jtg strings on weblate since saturday

El lun., 23 ago. 2021 09:29, HvdWolf (Surfer63) @.***> escribió:

Hi Martin,

sorry, but what do you mean with "in the ES networks..."? For other projects? Here on weblate? here on weblate for JTG?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hvdwolf/jExifToolGUI/issues/124#issuecomment-903720173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJIUF33PCFYURJAZ5I5A3T6I5K5ANCNFSM5CDTNYEQ .

comradekingu commented 3 years ago

@hvdwolf That sounds like the thing to do. I would add a "Push address" in https://hosted.weblate.org/settings/jexiftoolgui/program_strings/#vcs https://hosted.weblate.org/settings/jexiftoolgui/help-texts/#vcs https://hosted.weblate.org/settings/jexiftoolgui/glossary/#vcs

And then https://docs.weblate.org/en/latest/admin/continuous.html?highlight=continous%20localization#automatically-receiving-changes-from-github

https://github.com/searxng/searxng/pull/250 is an example.

hvdwolf commented 3 years ago

That's exactly what I wanted to do, but I was not completely ready for it and was not certain as to what to fill in as push address. I assume the push address is the same as the pull address. Or am I wrong?

Secondly: also the other languages still contain the "\" as line-end in the properties files. So I first wanted to lock the weblate translation project. Push open changes to my JTG repo. Then modify (search & replace) the occurrences of the "\" in my local JTG repo in the strings and help_text properties files, then commit/push the changes again to my JTG repo. Then update/pull the changes in weblate, and then unlock the project again and configure for the automatic pushes.

comradekingu commented 3 years ago

It should be the same for this project, since it pulls and pushes to the same repo/branch. https://github.com/hvdwolf/jExifToolGUI

I also think it is possible to use

git@github.com:hvdwolf/jExifToolGUI.git

Btw: There is a batch-editing tool on Weblate you can use to remove " \ " directly. I think the plugin for it must be turned on first.

hvdwolf commented 3 years ago

I wanted to work on help texts, but if they contaiin too many html codes, they get completely corrupt. I saw the same with some of the Spanish texts where I modified a few html chanracters in some strings (not the translation itself). This not due to the html characters, but due to some of the "weird" spanish characters (I assume). Maybe that works correct when you use weblate itself also in the spanish language

mrtngrsbch commented 3 years ago

Let's see what happens with this. I am translating all the strings that Weblate offers me but I think that sometimes I don't understand well what it is doing. ... and in some cases I would like to make some suggestions or corrections to the EN strings.

comradekingu commented 3 years ago

@mrtngrsbch You can switch to the english (source) language on Weblate and put in suggestions for respective string there. If you don't understand, leave a comment and I will try to explain the ones I have figured out in nb_NO. You can add other languages you understand as secondary languages in the settings to see how a string is translated in other languages. :)

mrtngrsbch commented 3 years ago

hi @comradekingu , Sorry I'm still dizzy with Weblate (I miss plain text).

In this URL: https://hosted.weblate.org/translate/jexiftoolgui/program_strings/es/?q=has:dismissed-check I find a string in EN that I think needs to be corrected:

Now I have managed to make a minor suggestion: https://hosted.weblate.org/translate/jexiftoolgui/program_strings/en/?&offset=431

comradekingu commented 3 years ago

@mrtngrsbch You can't link to &offset, needs to be "copy link". I removed the surrounding whitespace from the <br> in the es translation.

The dot is correct because the entire sentence is enclosed. :)

hvdwolf commented 3 years ago

@comradekingu : Hi, You changed the source string xis.sephash from "hash sign (#)" to "poundsign (#)". This is incorrect. The hash sign is # like it was, and the pound sign is the £, which is British pound sterling. (It is not poundsign either as it is 2 words.) I changed it back.

I also see that you made numerous improvements in the other sourcre strings. Thanks :thumbsup:

I did set the repos to automatic push every 24 hours, but I see nothing happening. No real error messages either, but I do see 2 rebase commits, which should not happen. Or am I wrong? Of course I Googled but I can't find it, Do you have an idea?

Another strange thing (to me): Yesterday evening there were 230 uncommited changes. This morning 210. How is that possible?

hvdwolf commented 3 years ago

Hi, @comradekingu @mrtngrsbch @KovalevArtem @MetadataDeluxe

I created a 1.9.0-beta build with the translations so far. See on Mega-NZ for a jar, Appimage, deb package and windows package. For some reason I currently can't build a macOS package. I will check that.

https://mega.nz/folder/UFlRhYCZ#LITpkOKT79CNWtmdwCG0bw

comradekingu commented 3 years ago

@hvdwolf https://hosted.weblate.org/settings/jexiftoolgui/program_strings/#vcs is set to "rebase", so that is to be expected. Could be that some changes got reverted? Or you changed 4 strings (by ~5 languages) that are now fuzzy? (I think those should be committed and counted though)

Concerning #, "Hash sign" isn't correct by itself, or historically https://en.wikipedia.org/wiki/Number_sign https://www.dictionary.com/e/octothorpe/ "Number sign" seems like a good compromise. £ is "pound sterling", "pound symbol" or "British pound sign", but I am not 100% on that.

hvdwolf commented 3 years ago

I must admit that I had not even spotted the "rebase" setting. I had not touched that either, so it must be the default setting. I prefer merge though. I don't change any strings anymore in my repository. I did add a new string for new functionality, because I need to test that before bringing it to weblate. Could that be the reason? However, before I did that I did a full commit and push on weblate for all open translations, and pulled that into my local repository before adding the new string locally and pushing that back. So again: I prefer merge in any normal github repository, but must admit that I'm far from an expert when it comes to weblate. Please advice.

Being tought British English instead of US English, the pound sign was uncommon to me. The hash sign (not hash tag) goes ages back, but that is not relevant anymore. (I am also from before "the Internet" :wink:). "Number sign" is fine. And now we wait for someone wanting to expand the "en" translation to "en_US", "en_GB" etcera. Same for de_XY and es_XY codes.

mrtngrsbch commented 3 years ago

I have been an administrator of Drupal Espanol since its beginnings and I was one of the people who insisted on using 'one neutral Spanish'. Opening the strings to regions is very time consuming and only big projects can do it.

KovalevArtem commented 3 years ago

I created a 1.9.0-beta build with the translations so far.

Please make a more recent build 😊 (I'm only interested in Windows)

hvdwolf commented 3 years ago

Thanks. And you're lucky. I have a day off and could immediately push/pull the translations and rebuild. Please find a new windows build jExifToolGUI-1.9.0.0_beta-20210901-win-x86_64_with-jre.zip in the same shared folder: https://mega.nz/folder/UFlRhYCZ#LITpkOKT79CNWtmdwCG0bw

I also uploaded a new jar, deb and AppImage. The macOS package still gives issues. I will switch to another linux box to try there, or create a build environment on my old, low memory and thereby horribly slow, macbook.

Edit: and a new 1.9.0-beta full macOS build from my Debian rpi4.

KovalevArtem commented 3 years ago

Most used categories

image It seems that this line is not in the project for translation image

hvdwolf commented 3 years ago

Sorry, somehow overlooked that one. Just added in 83bc50e

hvdwolf commented 3 years ago

Under Help -> Credits, I have the following (untranslatable) text, where I added Norwegian and Russian.

Do you agree? Do you want your real name?

KovalevArtem commented 3 years ago

To make it "beautiful", please write my initials, like everyone else... 😅 Artem Kovalev

comradekingu commented 3 years ago

@hvdwolf rather have "Allan Nordhøy" ----------------- (oversettelse til norsk bokmål.) Having issue ensuring https://hosted.weblate.org/zen/jexiftoolgui/program_strings/nb_NO/?q=state:empty are translated correctly. I'll give it a go, but some clarifications would help a lot.

Edit: There should be a space following the colon for Russian, "Gradle" "IntelliJ IDEA", "Java" and "Python". Also there is a ".;" which is somewhat odd.

- Allan Nordhøy: Setup and help for Weblate and Norwegian Bokmål translation (oversettelse til norsk bokmål)
- Artem Kovalev: Russian translation (Русский перевод)
- David Däster: Bringing structure into this project.
                Building the facades, adding the logger, creating the IntelliJ IDEA/Gradle integration.
                I started as Python programmer, hardly knowing anything of Java, and he helped, educated and corrected me
                in many areas (although I undoubtedly made again many errors afterwards).
                Thanks for all your support!
- Karsten Günther: German translation (Deutsche Übersetzung)
- Martin Gersbach: Spanish translation (Traducción Española) and Spanish Online Manual
hvdwolf commented 3 years ago

@Artem: Sure will do. @Allan: Please take your time. I need another week somewhere in my normal work schedule to finish one last thing: Searching metadata works. I now want to add a button like "only load images from search result", but then a bit more compact to not have a page-wide button. 😃 I first had "in order of contribution" but simply alphabetical is much better.

The ".;" is a typo which I have overlooked at least 10 times.

mrtngrsbch commented 3 years ago

Hi Harry, Please insert the spanish manual url Best

El mar., 12 oct. 2021 07:55, HvdWolf (Surfer63) @.***> escribió:

Under Help -> Credits, I have the following (untranslatable) text, where I added Norwegian and Russian.

  • David Däster: Bringing structure into this project. Building the facades, adding the logger, creating the idea/gradle integration. I started as python programmer, hardly knowing anything of java, and he helped, educated and corrected me in many areas (although I undoubtedly made again many errors afterwards).; Thanks for all your support!
  • Martin Gersbach: Spanish translation (Traducción Española)
  • Karsten Günther: German translation (Deutsche Übersetzung)
  • Comradekingu: Setup and help for Weblate and Norwegian Bokmål translation (Norsk bokmål oversettelse)
  • kovalevArtem:Russian translation (Русский перевод)

Do you agree? Do you want your real name?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hvdwolf/jExifToolGUI/issues/124#issuecomment-940897098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJIUGURTROBPERCUTP6ETUGQHZZANCNFSM5CDTNYEQ .

hvdwolf commented 3 years ago

Hi Harry, Please insert the spanish manual url Best

I will. And I need to add weblate as well as part of the open source tools

Credits

Contributors

Open Source components/libraries

hvdwolf commented 3 years ago

Hi, abusing this specific issue as I'm close to a 1.9.0 release.

See mega.nz: a jar, a full windows exe, a full MacOS bundle, an Ubuntu/Debian deb, and a Linux AppImage. All dated as 20211016, except the jar

Please give it another test round. And please let me know if you need more time for translations (or if you don't care 😉 )

Changelog

2021-10-xx 1.9.0

comradekingu commented 3 years ago

I can't really get any closer without submitting a guesswork of a translation. If you add context on Weblate for https://hosted.weblate.org/zen/jexiftoolgui/program_strings/nb_NO/?q=state:empty it would really help. The style is very verbose, which complicates matters, but that can be fixed in 2.0,0. Tried cleaning up the changelog: :)

Changelog
2021-10-xx 1.9.0

 -  Drop support for Java 8. As it does not support TIFF, an external (TwelveMonkeys) library was used to to support that.
    Maintaining support with TwelveMonkeys proved cumbersome, and Java 11 supports TIFF out of the box.
    Dropping TwelveMonkeys means the seldomly used PGM, PICT, and TGA is no longer supported.
 -  "Feature request" #156: Create a setting where users can define their own font and font size for the application to
    accommodate higher (HiDPI) resolutions.
 -  "Feature request" #117: Option to "switch off" thumbnail generation and metadata reading when loading images.
    This has the potential to load images at 400% scale almost instantly.
 -  Added option in the "Export/Import" pane and the "ExifTool Commands" pane to specify a folder instead of loading previews.
    Really fast with large amounts of images compared to initial loading and creating previews.
 -  Next to that: some ExifTool commands work faster when done on a folder as opposed to "Image by image".
 -  "Display the source folder in the bottom notification bar".
     It already showed the number of loaded files, and now also shows the folder.
     Note: Will not work correctly when dropping files from multiple folders into the program, or specifying multiple
     folders/files on the command-line.
 -  Support fast-scaling when resizing.
    As Java 8 is no longer supported, higher level image resizing/rescaling functionality can be used.
    This should give some 5-15% increased loading performance.
  - Support for Photoshop thumbnails added.
    Photoshop TIFFs containing these thumbnails now preview 25~50x+ faster because the entire
    (sometimes 45+ MB) image is not resized.
 -  Search in metadata of loaded images (added a magnifying-glass button).
    You can search for tag and on value. Images containing search results can be reloaded.
 -  Add VRAE config and VRAE custom metadataset.
 -  Display filename/path above metadata panel.
 -  Add menu option for "set file date to create date" for mp4/mov movieclips.
 -   [macOS] Fix "issue #118": "Skips conversion of HEIC images".
     Only the first occurrence of multiple spaces in path/filename were escaped.
 -  Updated splash logo to display "Exif", "GPS" and "XMP" in uppercase instead of "Exif", "gps" and "xmp".
 -  Fix null-pointer assignment in geotagging.
 -  Fix Set to DateTimeOriginal: spaces in ExifTool path caused error.
 -  Fix "issue" #110 [Windows]: If PATH contains multiple ExifTool versions, jExifToolGUI crashes. Fixed now.
 -  Fix "issue" #116 [Windows]: ExifTool command will not run if exiftool.exe directory contains a space.
 -  "Issue" #100: Add "-m" parameter to Edit → GPS tab to allow for longer than 32 character strings for IPTC.
     (Now checked off by default.)
    "Feature request" #124: Convenient localization (translation) using Weblate.
 -  GPS: Add "Add location to makernotes". Many cameras have location, country, state, city as makernotes.
    ExifTool will automatically put it in the correct Panasonic, Canon, Nikon, etc. tags.
hvdwolf commented 3 years ago

I am really sorry. The Changelog was only there to show you what is coming up in the next release. It is not meant to be moved to a weblate translatable string. It is always displayed from github in the app or the online pages/manual.

Anyway. I just pushed in one last change in case of not using previews. See little attached movie.

https://user-images.githubusercontent.com/4520361/137634716-63fb551f-964a-42f9-8c4e-2231d768f045.mp4

e

Edit: When opening the app and immediatelty switching off previews and metadata, I do not get a preview. Something is not initialised correctly the first time. So no uploaded versions yet.

hvdwolf commented 3 years ago

I found the null pointer crash. See mega.nz for the 20211017 versions including the latest translations.

comradekingu commented 3 years ago

@hvdwolf Not saying it has to be translated. Not showing the version full of errors does make a bit of a difference wherever it is displayed. https://hosted.weblate.org/translate/jexiftoolgui/program_strings/en/?checksum=fa01088539b63aa1 seems off to me. Edit: Two other comments in https://hosted.weblate.org/translate/jexiftoolgui/program_strings/en/?q=has%3Acomment&offset=1

hvdwolf commented 3 years ago

Hi, What do you mean with "Not showing the version full of errors does make a bit of a difference wherever it is displayed."? If you mean that I did not pay attention to comments yet, that is because I am so new to Weblate that I did not even know how to find these.

I added an explanation to https://hosted.weblate.org/translate/jexiftoolgui/program_strings/en/?checksum=fa01088539b63aa1 So it is not wrong, but might need a better description based on the explanation I gave.

I also looked at the other 2 comments and modified the source strings.