Summary: | Add translation context for "Order" | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | I18N/L10N | Assignee: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | f.demians, fridolin.somers |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch adds context for translators for the word Order, as it is sometimes used as a verb (e.g. to order) and a noun (e.g. an order).
|
Version(s) released in: |
23.11.00
|
Circulation function: | |||
Attachments: |
Bug 34834: Add translation context for "Order"
Bug 34834: Add translation context for "Order" Bug 34834: Add translation context for "Order" |
Description
Caroline Cyr La Rose
2023-09-19 20:12:21 UTC
Created attachment 155948 [details] [review] Bug 34834: Add translation context for "Order" This patch adds context for translation to the term "Order". It is sometimes used as a verb (e.g. to order) and sometimes as a noun (e.g. an order). To test: 1. Go to the various pages and make sure Order appears correctly in English - orderreceive: when receiving multiple orders, the table heading - parcel: when receiving an order, there is a "View" menu with "Order", "MARC", and "Card" - z3950_search: when adding an order from an external source, if you hover the mouse on the Order option, there is a thing that opens (a tooltip?) with the word "Order" 2. Apply patch 3. Redo step 1 in English, make sure the pages still work 4. Update the translation files gulp po:update --lang fr-CA 5. View the messages.po file and make sure the term is translated for both verb and noun context (you can put anything, just something different to tell them apart) 6. View the pages in the other language, the terms should be - orderreceive: noun - parcel: noun - z3950_search: verb I tried using the _p() and __p() syntax in parcel.tt and I can't get it to work. I change the line to either result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _p("noun","Order") + '</a></li>'; or result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + __p("noun","Order") + '</a></li>'; and run gulp po:update --lang fr-CA The word is not in either messages.po or messages-js.po What am I doing wrong? In the mean time, I changed the file for Owen's solution of putting the text between the opening and closing tags like <a>text</a> rather than inside the opening tag. This works well, the page loads, the word is in the po files and the translation is applied. The one in parcel.tt is the most annoying one of the three tbh, so I'd really like it to be fixed. Created attachment 155955 [details] [review] Bug 34834: Add translation context for "Order" This patch adds context for translation to the term "Order". It is sometimes used as a verb (e.g. to order) and sometimes as a noun (e.g. an order). To test: 1. Go to the various pages and make sure Order appears correctly in English - orderreceive: when receiving multiple orders, the table heading - parcel: when receiving an order, there is a "View" menu with "Order", "MARC", and "Card" - z3950_search: when adding an order from an external source, if you hover the mouse on the Order option, there is a thing that opens (a tooltip?) with the word "Order" 2. Apply patch 3. Redo step 1 in English, make sure the pages still work 4. Update the translation files gulp po:update --lang fr-CA 5. View the messages.po file and make sure the term is translated for both verb and noun context (you can put anything, just something different to tell them apart) 6. View the pages in the other language, the terms should be - orderreceive: noun - parcel: noun - z3950_search: verb Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 158139 [details] [review] Bug 34834: Add translation context for "Order" This patch adds context for translation to the term "Order". It is sometimes used as a verb (e.g. to order) and sometimes as a noun (e.g. an order). To test: 1. Go to the various pages and make sure Order appears correctly in English - orderreceive: when receiving multiple orders, the table heading - parcel: when receiving an order, there is a "View" menu with "Order", "MARC", and "Card" - z3950_search: when adding an order from an external source, if you hover the mouse on the Order option, there is a thing that opens (a tooltip?) with the word "Order" 2. Apply patch 3. Redo step 1 in English, make sure the pages still work 4. Update the translation files gulp po:update --lang fr-CA 5. View the messages.po file and make sure the term is translated for both verb and noun context (you can put anything, just something different to tell them apart) 6. View the pages in the other language, the terms should be - orderreceive: noun - parcel: noun - z3950_search: verb Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x |