View Issue Details

IDProjectCategoryView StatusLast Update
0008741Talerlibeufin-bank-ui (SPA)public2024-07-26 00:12
Reportersebasjm Assigned ToStefan  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.12Fixed in Version0.12 
Summary0008741: test how translation context is used (i18n)
Descriptionin weblate
TagsNo tags attached.

Relationships

related to 0008826 assignedsebasjm pogen should add msgctxt based on the source code 

Activities

sebasjm

2024-05-08 16:47

developer   ~0022374

we can use https://docs.weblate.org/en/weblate-5.4.3/user/translating.html#source-context

context can be defined with msgctxt
https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

in weblate we can also see "Source string location" which right now is pointing the the `ts` source. Not very helpful right now but it the future it can be a href where the translator can see pre-made screenshots.

Example of the msgctxt in Weblate:
--------------------------

The bank SPA has the string "send" used in the form for making a wire-transfer. Right now the translator just see the word to be translated.
Msgcxt can be used to clarify in which context this word is being used. And the same word with different context can be distinguish and translate differently if required.

I'm attaching an example of the "string information" section in weblate of an unstraslated string "Send" with msgctxt "wire_transfer".

The context could be any string but we should first implement this in the pogen software to generate that information from the source code.
image.png (34,759 bytes)   
image.png (34,759 bytes)   

Stefan

2024-06-17 18:10

developer   ~0022652

We can continue using Weblate's built-in functionality to provide and manage specific context info. As images tell more than a thousand words, images like e.g. app screenshot are preferable. Screenshots are accepted as images of up to 2000 x 2000 pixels, though. Normal screenshot dimensions from smartphones measure 1.080 x 2.400 pixels and therefore have to be cropped or scaled down each time (which is annoying when you have to manage dozens of images).

I tried to add a screenshot in Weblate (https://weblate.taler.net/screenshot/1/) as an example. To upload the screenshot image (here a PNG) to Weblate's local repository I had to give it a name first ("Android_Obsolete_button_text") and then I could assign it to a plurality of English source strings. Of course, I had to choose the relevant strings. For this purpose, there are two buttons: "Search" for a manual search to find a source string and "Automatically recognize". I better advice to do the manual search and work with keywords that match with the variables in the app's source code. It is a good deal to look at the source code in the app to be sure about the context of a string. Finally, I assigned the PNG image to two neighboring strings (https://weblate.taler.net/translate/gnu-taler/wallet-android/de/?checksum=676048a43301cbd9 with the key 'withdraw_button_confirm_bank', https://weblate.taler.net/translate/gnu-taler/wallet-android/de/?checksum=f84259af8c116559 which has the key 'withdraw_button_confirm').

Conclusion: String attributes like message ID or location in the source code are our best orientation right after screenshots whereas context (msgctxt) is a nice-to-have but not very reasonable for our rather tiny projects with only few doublets in apps that are relatively easy to overlook and differentiate. We better leave it as is and renounce on the msgctxt pogen feature.

Issue History

Date Modified Username Field Change
2024-04-15 20:01 sebasjm New Issue
2024-04-15 20:01 sebasjm Status new => assigned
2024-04-15 20:01 sebasjm Assigned To => sebasjm
2024-04-17 15:16 sebasjm Summary test how transaction context is used => test how translation context is used (i18n)
2024-05-08 16:47 sebasjm Note Added: 0022374
2024-05-08 16:47 sebasjm File Added: image.png
2024-05-08 16:53 sebasjm Relationship added related to 0008826
2024-05-08 16:54 sebasjm Assigned To sebasjm => Stefan
2024-05-08 16:54 sebasjm Status assigned => feedback
2024-05-13 21:29 Christian Grothoff Target Version 0.11 => 0.12
2024-06-17 18:10 Stefan Note Added: 0022652
2024-06-17 18:12 Stefan Status feedback => resolved
2024-06-17 18:12 Stefan Resolution open => fixed
2024-07-26 00:11 Christian Grothoff Fixed in Version => 0.12
2024-07-26 00:12 Christian Grothoff Status resolved => closed