Hi George,

thanks for all your help. I like the result.

How could I submit a german language po-file for the module. Haven't done that before (don't just want to translate the interface for myself).

Please advise ...

Kind regards,

Frank

Comments

spade’s picture

StatusFileSize
new2.74 KB

Hi George,

I did some reading and created a pot-file for your module, which I translated. I then tried to import the file and got the message that "5 translation strings were skipped because they contain disallowed HTML." Maybe that was my mistake.

I'll attach my pot-file for your review.

Kind regards,

Frank

George2’s picture

thanks for this. please check your translation file! example, at the start of the file:

msgid "Log in URL from !site"
msgstr "Link zum Einloggen in die Site site"

should become something like:
msgstr "Link zum Einloggen in die !site" (no variable in the above translation)

i know german is a whole language unto itself, but does it have to be "die !site", could you just drop the die? it makes sense in english!

i'm not sure about the invalid html errors, not having translated anything myself. maybe it's your translation file, maybe it's my module html.

spade’s picture

StatusFileSize
new2.74 KB

Sorry, I had dropped the exclamation mark.

The translation file was created with the potx module. Maybe we need to consult with an experienced translator about the html errors. I think my German is alright, It's my best language ;-)

Kind regards,

Frank

spade’s picture

StatusFileSize
new2.79 KB

New version with corrected plural form and header ...

spade’s picture

While trying to translate the interface through the Translate interface function I was unable to find the strings "Email new URL" and "Reset URL" (the button label). I added some t-funtion-calls to the code of your module, but that didn't help. Please advise.

Kind regards,

Frank

George2’s picture

i'm goign to hold off from adding this because i want to expose a text area for the admin to be able to type in their own message that is sent to the user with token support, and so a few minor things will change.

as for the non-translatable values on the buttons, i think i know what the issue it (they should be wrapped in t('...') - but clear your cache after doing so). i'll look into along with the above feature when i get time.

spade’s picture

StatusFileSize
new9.03 KB
new2.96 KB

Some news:
I discovered that your module did not only miss some t-functions, which I had added yesterday and which worked alright after I cleared the cache (thanks for the reminder).
There were also some illeagal calles ot the t-function in line 73, 82, 89 and 96. After fixing that and working some more on the po-file I can now offer a po-file that imports without errors. I also attach the corrected module file (added a .txt extention to get it uploaded).
Hope this helps.
Kind regards,
Frank

George2’s picture

could you make a diff file of the changes please - it's much easier to see what you've changed that way.

diff -up oldfile newfile > spades.patch

drupal.org/patch/create

thanks

spade’s picture

What keeps you from making that diff file yourself?

George2’s picture

i've spent hours on this module - for free.

it's protocol for the reporter of errors who changes them to make a patch.

the file you've just uploaded is not the same version as the one i'm working on at the moment.

i see incorrect usage of the t function which i don't want to use.

i'm not going to dl the old module version, or checkout an old version, and then run the diff.

ok, now that's out the way, please check the instructions drupal.org/patch/create and make a little diff (it'll take 10 seconds i promise) so then i can see the changes you've made!

thanks

spade’s picture

StatusFileSize
new3.08 KB

>> I spent hours on this module for free
Yes, and I thank you for that. I am spending my time on helping you debug it for free too.

>> it's protocol for the reporter of errors who changes them to make a patch.
Sorry, I wasn't aware of any such protocol. Where can I read up on it to avoid any future transgressions?

>> i see incorrect usage of the t function
I don't know what you saw, maybe it's the same I saw ;-)

Well, it didn't take me 10 seconds, since this was the first time I created a diff, but I thank you for the reference. It was worth the time to learn it. So here is the patch ...

Kind regards,

Frank

George2’s picture

yes! it's a great experience! i assume you're working in linux, and it's a heck of a lot easier than doing it in windows.

i can now see what lines you've changed, and i also think you've did the command diff -up newfile oldfile > easylogin.patch! ;) if you look at the patch file, the - means what lines are to be removed, and the + means to replace that line with whatever. it would look like you're removing the t('...') from the module, and replacing the line without the t function, which isn't what you want ;)

anyway, i can see the error now, and your fix isn't the 'proper' way. it should be something like t('blah blah @username', array('@username' => $account->name)); etc.

i'll update the dev within the next few days, and you should be able to cleanly run the extractor against that. or, if you're feeling brave, then you should be able to update the t strings now, test it out, then submit the patch!

thanks

spade’s picture

StatusFileSize
new3.08 KB

Hi George,

sorry, I am still mostly a windows junkie. It's just a bad habit, that's hard to break after 20 years ...

Yea, you are right, the patch is the wrong way around. Greetings from Murphy ... I am attaching the correct patch ...

Well, I don't see where I did something like:
t('blah blah @username', array('@username' => $account->name));

What I did was to change something like:
drupal_set_message(t('Easylogin URL for user ' . $account->name . ' has been created.'));
(in four places) to
drupal_set_message(t('Easylogin URL for user ') . $account->name . t(' has been created.'));
what's wrong about that?

I also added some t-functions for statements like:
'#title' => 'Reset URL',
(in four places) to
'#title' => t('Reset URL'),

This code was loaded without errors as opposed to the previous version and I was able to get all strings translated.

Where did I go amiss?

Everything seems to work as it should ...

Kind regards,

Frank

George2’s picture

i've updated the code to the correct format in the latest version. I've also had to change a few strings around, so could you take a quick look at the translations please Frank, and everything should work just fine!
thanks

hass’s picture

Category: support » bug
Status: Active » Needs work
+++ C:/Downloads/Drupal/Drupal6/Modules/easylogin-6.x-1.2/easylogin/easylogin.module	Sat Mar 14 23:00:38 2009
@@ -70,7 +70,7 @@
+        drupal_set_message(t('Easylogin URL for user ') . $account->name . t(' has been created.'));

Context sensitive translation. Fix is wrong.

e.g.:

 t('Easylogin URL for user !username has been created.', '!username' => theme('username', $account->name))
+++ C:/Downloads/Drupal/Drupal6/Modules/easylogin-6.x-1.2/easylogin/easylogin.module	Sat Mar 14 23:00:38 2009
@@ -79,21 +79,21 @@
+        drupal_set_message(t('Easylogin URL for user ') . $account->name . t(' has been removed.'));

Context sensitive translation. Fix is wrong.

+++ C:/Downloads/Drupal/Drupal6/Modules/easylogin-6.x-1.2/easylogin/easylogin.module	Sat Mar 14 23:00:38 2009
@@ -79,21 +79,21 @@
+        drupal_set_message(t('Easylogin URL for user ') . $account->name . t(' has been created.'));

Context sensitive translation. Fix is wrong.

+++ C:/Downloads/Drupal/Drupal6/Modules/easylogin-6.x-1.2/easylogin/easylogin.module	Sat Mar 14 23:00:38 2009
@@ -79,21 +79,21 @@
+      drupal_set_message(t('Easylogin URL for user ') . $account->name . t(' has been removed.'));

Context sensitive translation. Fix is wrong.

Powered by Dreditor.