Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I recently translated the module to Catalan. Spanish will shortly be available too.
I am attaching the .po file in case you feel like including it in future releases.
Comment | File | Size | Author |
---|---|---|---|
#10 | watcher_ca.png | 72.75 KB | castawaybcn |
watcher_ca.po | 32.31 KB | castawaybcn |
Comments
Comment #1
castawaybcn CreditAttribution: castawaybcn commentedok, I know this is probably going to look very silly, but...
Is there a way to translate the email messages as well? Because it does not make much sense being able to offer the user the notification settings in their language and then send them English emails only...
Couldn't find a way to do it with localization client, perhaps you know of better (if other) ways.
Thanks a lot
EDIT
not entirely sure if this applies, but I found this cheat sheet http://hojtsy.hu/files/Drupal6TranslationCheatSheet.pdf, I wonder if the drupal api is used properly in the module (last point at the bottom of the cheatset) as the default message strings do not show up at all.
Comment #2
castawaybcn CreditAttribution: castawaybcn commentedComment #3
manoloka CreditAttribution: manoloka commentedYou can do it from admin/settings/watcher;
Scroll down to "Settings for Email Notification" open in and within you will find "Notification Message Template".
There you find the templates in English, just translate them to catalonian.
I'd happy if you share those with us too :-)
Thanks
Comment #4
manoloka CreditAttribution: manoloka commentedI've used you .po file but it isn't working
Comment #5
castawaybcn CreditAttribution: castawaybcn commentedNo you cannot. At least not what I am trying, but I am probably missing something here.
What I do:
go to admin/settings/watcher and find the templates, they are fine with me in English, so I switch to another language and start typing the translation.
Then I save and switch back to English.
What happens is that the same text is used regardless of the language used. My site has 3 languages the users can choose from. If I grant them the rights to access watcher settings they will be presented with all the dialogues in the language of their choice. But the emails they will get won't be translated.
Do let me know if I should explain this better. It's quite obvious to me but I might not be making myself understood ;)
Also, what error do you get with my po file?
tx for the answer anyway manoloka!
Comment #6
solipsist CreditAttribution: solipsist commentedYeah, that's how it is. The message text cannot be translated which means every user at your site will receive the message in the same language. This was a limitation that wasn't an issue earlier. I haven't had time to implement a different solution either. It's on my TODO list.
Comment #7
castawaybcn CreditAttribution: castawaybcn commentedgood to know. I still believe that it does not make much sense being able to translate the interface but not the emails though.
As soon as this feature is available you can count on me to provide you with both Catalan and Spanish translations. Do let me know if you want me to start working on them as you develop the new feature.
Comment #8
manoloka CreditAttribution: manoloka commentedI don't get any error, it simply keeps showing in English.
Comment #9
castawaybcn CreditAttribution: castawaybcn commentedStrange, it does work for me... Did you try opening it with poedit? All strings are properly translated as far as I can tell.
Comment #10
castawaybcn CreditAttribution: castawaybcn commentedI'm posting a screenshot of the module settings page in Catalan
Comment #11
castawaybcn CreditAttribution: castawaybcn commented@manoloka
did you try importing it from www.yoursiteurl/admin/build/translate/import?
Please do and tell me if it works. Select the following options:
Comment #12
castawaybcn CreditAttribution: castawaybcn commentedchanged title to better reflect the issue
Comment #13
manoloka CreditAttribution: manoloka commentedNo I didn't (at the time) I just copied the file and upload it with the module.
I've now imported it as you suggested and it is working fine .
I'm pretty new to translations (and amateur to Drupal too), I know how it's done now.
Thanks
Comment #14
castawaybcn CreditAttribution: castawaybcn commentedso am I, and I could not manage a workaround for a couple of critical issues regarding translations: emails & taxonomies.
Should you have any useful tips on those I would very much appreciate if you could share some knowledge ;)
Comment #15
castawaybcn CreditAttribution: castawaybcn commentedComment #16
castawaybcn CreditAttribution: castawaybcn commentedI found a workaround, not the ideal fix but it is simple enough to get it working.
Look for watcher in your sql variables table and just follow the instructions found here: http://drupal.org/node/134002
I didn't have time to test it yet, but I am confident this is the way to go (for now). Will post the results as soon as I try it myself.
Comment #17
solipsist CreditAttribution: solipsist commentedInteresting solution. However it's not enough as you need to get the user's preferred language too. For anonymous users, this is generally the default language of the site. However if you allow language switching for anonymous users, Watcher will have to store the code for the currently active language (en, sv, es etc) in the database.
Comment #18
castawaybcn CreditAttribution: castawaybcn commentedwould this http://drupal.org/project/reglang be of any help? For registered users at least, I mean.
Comment #19
solipsist CreditAttribution: solipsist commentedPlease do not change the status unless you're confident with its meaning. "Needs work" implies there's a patch submitted which needs revising. I'm changing this back to "postponed" as it's the status I've assigned for now. I may work on i18n for the 6.x-2.0 release but it depends on how much time I have available, which happens to be very little right now. I hope to be able to make strides over the summer.
Comment #20
solipsist CreditAttribution: solipsist commentedRegistered users can always choose a preferred language, it works in core. The reglang module won't be necessary. Point is, getting i18n working properly isn't trivial as I'll have to alter the module's database schema. That means some quite extensive module patching will be needed. Though if someone would like to contribute a patch it would be most welcome.
Comment #21
castawaybcn CreditAttribution: castawaybcn commentedsorry about the status change, it was done with the best intention but you are right: I did not know exactly what I was doing.
I would love to give a hand fixing this, but my drupal and php knowledge are way too limited. I am willing to test and report the results whenever you have some work in progress though.
Comment #22
solipsist CreditAttribution: solipsist commentedNo worries, it just makes the queue a bit tidier, that's all.
Thank you very much for wanting to help with testing. Finding people interested in helping with testing is even harder than finding people willing to do programming. I appreciate it a lot!
Comment #23
dddave CreditAttribution: dddave commentedIf there is some progress of i18n implemantation I too would like to help testing.
Comment #24
ssm2017 Binder CreditAttribution: ssm2017 Binder commentedsubscribing
Comment #25
tds2012 CreditAttribution: tds2012 commentedHi
I need to have the notifications translated in Dutch and French. Using importing .po-files, everything in the module is translated except for the e-mail bodies. The e-mail subject is translated correctly, depending on the language the user is using, but not the body of the notifications!
In config/watcher, if I edit the dutch texts, it displays that same text also in English or French. Is there a solution?
Regards,
Tommy
Comment #26
solipsist CreditAttribution: solipsist commentedTommy, this sounds like a bug. Watcher isn't great at supporting multiple languages and it's handling it sort of clumsily right now. Would you be interested in helping improve it?
Comment #27
tds2012 CreditAttribution: tds2012 commentedHi solipsist,
I don't think I can be of any help developing the module, my knowledge of php is rather basic, mostly it's just trial and error (and in some cases hit and run!). If you need/want the dutch .po-file, I will happily provide it when my project is finished (since I heavily customized textstrings in de core of the module and so, also in the translation, I have to 'uncustomize' it).
Concerning my issue, the solution is rather sloppy, but I have the 3 languages in one mail.
Regards,
Tommy
Comment #28
AnybodyThe messages should be declared as variables. That way they will be translateable via variable translation / realms.
Is there still interest in such a functionality? Then we could create a patch together. Other modules and Drupal core already contain such solutions.
See http://api.drupalhelp.net/api/variable/variable.api.php/function/hook_va... or issues in other projects like: #1209500: Implement hook_variable_info in order to allow variables (e.g. site_map_page_title) to be translated