Messages Are Not Translated

castawaybcn - March 9, 2009 - 15:50
Project:Watcher
Version:6.x-1.1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed
Issue tags:translation
Description

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.

AttachmentSize
watcher_ca.po32.31 KB

#1

castawaybcn - March 9, 2009 - 17:19

ok, 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.

#2

castawaybcn - March 10, 2009 - 08:37
Component:Miscellaneous» User interface
Status:active» postponed (maintainer needs more info)

#3

manoloka - March 25, 2009 - 13:47

You 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

#4

manoloka - March 25, 2009 - 13:56

I've used you .po file but it isn't working

#5

castawaybcn - March 27, 2009 - 13:12

No 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!

#6

solipsist - March 27, 2009 - 13:17

Yeah, 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.

#7

castawaybcn - March 27, 2009 - 13:23

good 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.

#8

manoloka - March 27, 2009 - 14:57

Also, what error do you get with my po file?

I don't get any error, it simply keeps showing in English.

#9

castawaybcn - March 29, 2009 - 18:38

Strange, it does work for me... Did you try opening it with poedit? All strings are properly translated as far as I can tell.

#10

castawaybcn - March 30, 2009 - 08:24

I'm posting a screenshot of the module settings page in Catalan

AttachmentSize
watcher_ca.png 72.75 KB

#11

castawaybcn - March 30, 2009 - 18:07

@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:

  • Text group: Built-in interface
  • Mode: Existing strings are kept, only new strings are added

 

#12

castawaybcn - March 30, 2009 - 18:08
Title:Catalan Translation» Messages Are Not Translated

changed title to better reflect the issue

#13

manoloka - March 31, 2009 - 18:47

@manoloka
did you try importing it from www.yoursiteurl/admin/build/translate/import?

No 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

#14

castawaybcn - April 1, 2009 - 08:50

I'm pretty new to translations (and amateur to Drupal too)

so 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 ;)

#15

castawaybcn - April 2, 2009 - 15:37
Assigned to:castawaybcn» Anonymous

#16

castawaybcn - April 24, 2009 - 16:45
Status:postponed (maintainer needs more info)» needs work

I 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.

#17

solipsist - April 24, 2009 - 16:50

Interesting 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.

#18

castawaybcn - April 24, 2009 - 16:53

would this http://drupal.org/project/reglang be of any help? For registered users at least, I mean.

#19

solipsist - April 24, 2009 - 16:54
Status:needs work» postponed

Please 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.

#20

solipsist - April 24, 2009 - 16:57

Registered 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.

#21

castawaybcn - April 25, 2009 - 09:08

sorry 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.

#22

solipsist - April 25, 2009 - 09:12

No 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!

#23

dddave - May 26, 2009 - 06:46

If there is some progress of i18n implemantation I too would like to help testing.

 
 

Drupal is a registered trademark of Dries Buytaert.