Seems Ubercart is not available in Danish - am I overlooking something?

Are there translated files for anything other than BackdropCM?

Comments

https://localize.backdropcms.org/ doesn't (yet) contain translation packages for other projects other than Backdrop CMS. I see you and Olaf are the only members of the Danish translation group. I think it would make sense to add Ubercart as a project in the localization server - Olaf, should we work on that in the near future?

I will not start this - unless there is a Drupal translation needing to 'move over'  - since there are other shop possibilities - like OpenCart.

But, sad.

You can alway do your own translation locally ;-) There shouldn't be too many new strings in Ubercart.

I will look into it - and get back on the horse re translating Backdrop (hope I can remember how)

Olafski's picture

Yes, let's work to provide contributed modules on the translation server, not only Ubercart. I think it's an important project, and I hope we can make it possible. Probably not this year, but maybe early 2025?

Olaf,

I had hoped I could download/export the danish language file, get AI to translate untranslated strings, import/upload the translations.
Seems the download only have the translated strings.

Is there a way to do that? ChatGPT is very good at translating into Danish.

Olafski's picture

Hi Egmund, you should indeed be able to export the Danish language file from the  "Export translation" page (admin/config/regional/translate/export).

However, in a fresh installation or if Danish was added only recently, there will be only a few strings. Backdrop seems to 'collect' the translations strings only bit by bit, e.g. when you visit pages in the foreign language. I don't know the reason for this behavior, but there is already a core issue about it. It's really odd, but when you use your site a while and export another language file, it should contain more strings.

Must say I am confused.

The downloadable language files contain no untranslated strings, but my site says less than 60% is translated. 

And on the translation server there is also a lot not yet translated.

What I am interested in is a download of only un-translated strings - possible?

 - or at least a download (export) including untranslated strings.

I don't use translation myself, but I had a quick look and think this is where you need to go on your site:

If you do this after you have a long list of untranslated strings then you get a large file with the English and a space for the translated string.

Each string looks like:


#: /da/admin/structure/views/settings
msgid "Live preview settings"
msgstr ""

 

You are right. Thank you, Got the file.

Olafski's picture

Hi Egmund, strange that you didn't get untranslated strings!

On the the  "Export translation" page there are two Export buttons: one for the language and one for the template. Which one did you use?

To get a .po file of translated and untranslated strings, I used the language option, chose German and clicked "Export", resulting in a file called de.po. Just the first entry in my file is an untranslated string example. Look for the empty mgstr value:

#: /admin/modules/list/confirm
msgctxt "config:system.core:anonymous"
msgid "Anonymous"
msgstr ""

In contrast, an example for a translated string in the same file:

#: ; core/misc/backdrop.js
msgid "An AJAX HTTP error occurred."
msgstr "Ein AJAX-HTTP-Fehler ist aufgetreten."

Can you have another try and look for empty mgstr values? If you don't find any, how many lines does your file have?

Thank you - it is clear now. Export from my own site.

I was talking about 'export' from the Backdrop translation-server.

I will see what AI can do with the file - could be interesting time-saver.

ChatGPT is unbelievable for this. Got it to translate half of the missing strings in half an hour.

It just need to know that it is supposed to be in 'Gnu gettext' format.

Not sure of the procedure.

Can I upload/import a partial .po file to the Backdrop Translation server or does it have to be a complete export from my site?

Olafski's picture

Hi Egmund, to share your translations of Backdrop core on the Translation server, you can import any .po file with Backdrop language strings, it doesn't have to be complete. (If you just want to use your translation on your other Backdrop sites, you can import .po files there as well.) Hope that helps!

Thank you Olaf,

I am in the process of getting every string on my experimental site with Ubercart translated by ChatGPT - so far with very acceptable result (better than I could do manually).

The .po file from my site would be quite 'polluted' by strings from all modules installed. Can it be used on the Backdrop language server anyway? 

Very interesting - seems useful.

But it gives me an error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.langcode' in 'where clause': SELECT t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON t.lid = s.lid WHERE s.source = :source AND t.langcode = :langcode; Array ( [:source] => Basic settings [:langcode] => da )

 - and if I try the 'language independent' I do not get the translated strings. So; unfortunately at this point rather useless.

Also - it doesn't seem to have the possibility of extracting Backdrop itself.

Well, this module is used in localize.backdropcms.org without any issues, and I use it myself, so the problem must be in a specific setup you are using. Without a line number for the error, or more information, it'd be very difficult to figure out the problem. 

Here's the .po file for ubercart:

https://gist.github.com/argiepiano/30de8f1453a4c75ebf0b944d862fa882

Thank you for your help, but my ubercart is already translated. Maybe I can use it to - in the future - upload to the Backdrop language server. I have downloaded it.

I am not btw the only user having this above mentioned error according to github.

I now have a fully translated (into Danish) Ubercart Backdrop store thanks to ChatGPT - the free version. I only see very few 'glitches' - in general much better than I could do - well, unless I had 'all the time in the world'. I would not have been able to this in a month.

Just awaiting response whether I can upload my translated .po file to the Backdrop language server without creating problems (it is 'polluted' by module translations)

Olafski's picture

Hi Egmund, good to hear from your progress! As far as I know, importing your .po file on the translation server shouldn't raise any problems. If I recall correctly, the import functionality just ignores any string that isn't part of an existing 'project' on the Translation server. (At the moment, the only project is Backdrop core.)

Confusing result:

  • The translation was successfully imported.
  • 827 translations added, 4356 duplicate translations not saved, 2151 source strings not found; their translations were ignored

How come these 'duplicated translations' are not in the language file then?

Also: there are (at least) hundreds of untranslated strings left on the Backdrop language server. Are they then from previous releases?

I looked through exported as well as standard downloaded files: All strings seems to be translated - 100%

Now I am even more confused - but this seems good though for future Danish users.

I exported the .po from my ubercart site and imported into another site.

Result: there were missing translations, probably related to other themes and modules, as well as all the ubercart strings is in the other site now - not really a problem, but???

I will import my translated .po onto the Backdrop server to see how that goes.

Confusing result:

  • The translation was successfully imported.
  • 827 translations added, 4356 duplicate translations not saved, 2151 source strings not found; their translations were ignored

How come these 'duplicated translations' are not in the language file then?

Also: there are (at least) hundreds of untranslated strings left on the Backdrop language server. Are they then from previous releases?