fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
418 stars 290 forks source link

untranslated string vendor.min.js #4963

Closed HerzScheisse closed 3 months ago

HerzScheisse commented 3 months ago

Hi,

i found a untranslated string when using some input field like sources, or shared places... i guess it comes from public/js/vendor.min.js

dont know if its even possible to translate this inside the js file... not a big problem if not, but wanted to mention it here...

no result error

fisharebest commented 3 months ago

We need to store the translated text in data-* attributes, and then use them in the initialisation for the TomSelect objects in webtrees.initializeTomSelect().

fisharebest commented 3 months ago

https://tom-select.js.org/examples/i18n/#internationalization

fisharebest commented 3 months ago

The code has been updated. The text should be available for translation at https://translate.webtrees.net in the next 24 hours.

HerzScheisse commented 3 months ago

wow that was fast... didnt expected that. thank you...

for the translation, what about using the already existing string of I18N::translate('No results found.') instead of I18N::translate('No results found') (note the dot at the end of the line) in the resources/views/components/ files?

fisharebest commented 3 months ago

what about using the already existing string

I only saw that one after I rebuilt all the translation files. I prefer the translation without the ..

If you have spare time, perhaps you could visit the translation server, and copy/paste the existing translations and remove the .?

HerzScheisse commented 3 months ago

yeah i can do that... do i need to wait for the changes to arrive on the language server and than fix that?

I took a quick look and can use search and replace there... to remove the dot... And then i update the translation files, where the newly added translation string are used, right?

fisharebest commented 3 months ago

The translations should be available now.

We need to create new translations (rather than edit the existing ones) as old versions of the code (2.0) still use the old strings with the ..

Editing the translation files directly often causes merge conflicts, which are time-consuming to resolve.

HerzScheisse commented 3 months ago

okay thanks for the info..

Done...