Closed (fixed)
Project:
Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 May 2015 at 21:48 UTC
Updated:
9 Jul 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jonathan1055 commentedThanks for spotting this.
On https://localize.drupal.org/translate/projects/scheduler/releases we have no warnings about missing strings. I thought that syntax parsing was meant to find these missing translations. Could you double-check that these labels are meant to have t( ) as some label strings should not.
Jonathan
Comment #2
dtamajon commented@jonathan1055, maybe those lables are not required to be used with t( ), because those labels affects only to Rules tokens, and usually only used by developers.
I have attached an image where I can see all token descriptions translated, but not Scheduler ones. I think should be translated to be in coherence with other labels... but not sure if must be.
Comment #3
jonathan1055 commentedUsing your screen shot I have found the Spanish translation, and hence source for the other strings. See
https://localize.drupal.org/translate/languages/es/translate?project=&st...
I can see the modules that provide that string - which one are you using? I'm fairly sure you are right that these string should have t( ) but I am interested to know why there is no warning that it is missing.
Comment #4
dtamajon commented@jonathan1055, most of the translations are mine. I tried to participate in translation project, but I never see any update, so I stopped pushing translations and have my own, and I don't use it because there are a lot of errors and mixing of spanish from different countries (which make no sense for any spanish speaker country).
I have translated most of them using Locale along different projects.
Comment #5
jonathan1055 commentedThanks for the background. I have now enabled Locale and downloaded the Scheduler spanish translation file for testing. I've got a test site working in Spanish with core and many Scheduler strings being translated. But the strings you have identified are not translated even though I have added them to the .po file and uploaded and refreshed. Maybe I am looking at the Rules Components tab, and editing a rule, picking 'data selectors'. Could you tell me which module you were using which allowed the translations in the screen-shot you added in #2. Was it one of the ones shown in the link I gave in #3 - see attached. If I can get some strings translated on this token list then I'll be able to check that the patch works.
Comment #6
dtamajon commented@jonathan1055, I use locale module for translations, from "Configuration > Regional and language > Translate interface > Translate". After translation, I need to clear caché to see translations applied on tokens.
To reproduce, I have edited 'Set scheduled publishing date' component, and then edit 'Set publishing date' action element. In data selector I get the translated string, as you can see in the new image.
The additional strings you can see,
'El propietario del pedido.' comes from 'The owner of the order.', in commerce_order module
'Total del pedido' comes from 'Order total', in commerce_order module
...I'm not sure if I'm answering what you requested so, if not, please let me know.
Comment #7
dtamajon commentedImage that applies to previous comment.
Comment #8
jonathan1055 commentedHere's a new patch with not only the missing t( ) calls you found, but also the addition of 'description' elements as well as the labels. I also spotted one string in scheduler.rules.inc which had the wrong text.
I still cannot get these strings to show in translated form, even though I can see other Scheduler strings in Spanish. I have re-imported my updated .po file, refreshed the strings and cleared the cache. I know it is working in general because I can see other translations change if I alter the .po file. It's just odd that some of these do not translate.
Anyway, please try this patch and let me know how you get on.
Jonathan
Comment #9
dtamajon commentedI have applied and looks fine. The label-description now is like in the other modules and I can see properly translated.
I only would say to add a final dot in the descriptions, as I can see in all other literals.
Comment #10
jonathan1055 commentedThanks for testing. Here is a patch with the final dot added, to match standards.
I would be interested to see a screen shot of your rules tokens with some of your translations of these strings. I wish I knew how to get them to show on my site. As I said, I can see other translated strings, but just not these.
Comment #11
dtamajon commentedThis images are for untranslated and translated "The node for publishing via Scheduler." which can be found in rule component "Set scheduled publishing date" > Action "Set publishing date" > First "Data Selector"
Comment #12
dtamajon commentedThis images are for untranslated and translated "The publication date of the node." and "The publishing date to be used by Scheduler." which can be found in rule component "Set scheduled publishing date" > Action "Set publishing date" > Second "Data Selector"
Comment #13
jonathan1055 commentedThanks. Somehow I have managed to get the new translations to show now, so it is all working from my point of view. If you are OK please mark this RTBC.
I also need to discuss how/if the 8.x development code needs to be patched.
Comment #14
dtamajon commentedComment #15
jonathan1055 commentedExcellent. Moving this to the 8.x queue as code fixes should always be done at the latest version then ported downwards.
Pieter, I've checked on https://www.drupal.org/developing/api/8/localization and the use of t() will be the same for these cases. The patch in #10 alters scheduler.rules_defaults.inc and scheduler.rules.inc, both of which apply ok (with an offset in one case) to the current D8 dev code package. Would you be able to commit these to the appropriate 8.x repository, then I will commit to 7.x
Thanks
Jonathan
Comment #17
pfrenssenThanks a lot for working on this. The patch applied perfectly. Committed to 8.x-1.x.
Comment #19
jonathan1055 commentedThanks Pieter. D7 commit done too.
Thank you Daniel for starting off the issue. Please let us know if you see any other strings which you cannot translate.