You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Florian Holeczek (JIRA)" <ji...@apache.org> on 2008/03/17 21:56:24 UTC

[jira] Created: (JSPWIKI-214) Captcha.jsp not fully localized

Captcha.jsp not fully localized
-------------------------------

                 Key: JSPWIKI-214
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
             Project: JSPWiki
          Issue Type: Bug
          Components: Localization
    Affects Versions: 2.6.2
            Reporter: Florian Holeczek
            Priority: Minor


In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.

Just an idea, I'm not so into Javascript programming:
Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-214) Captcha.jsp not fully localized

Posted by "Juan Pablo Santos Rodríguez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579658#action_12579658 ] 

Juan Pablo Santos Rodríguez commented on JSPWIKI-214:
-----------------------------------------------------

Hi!

not very sure to understand the issue: AsirraClientSide.js, adds some HTML markup to the page. Until it has finished loading, both the "Please select all the cat photos:" and "Adopt me" labels remain in english, as they are hard-coded into the script. Once it finishes, the rest of the page also finishes loading, which triggers the i18nAsirra() function, translating those texts.

As you see, there is a small amount of time in which those labels remain untranslated, but I don't see how could we get rid of it. We could place i18nAsirra() just below AsirraClientSide.js, but I don't think it would speed up the process, as most of the time is spent loading the images. Placing i18nAsirra() inside the <body> onload event seemed the correct approach to me, but I'm not a javascript guru, so any suggestion is welcome :-)

You are referring to this small amount of time or you aren't getting any translation at all?

Regards,
jp

> Captcha.jsp not fully localized
> -------------------------------
>
>                 Key: JSPWIKI-214
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 2.6.2
>            Reporter: Florian Holeczek
>            Priority: Minor
>
> In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.
> Just an idea, I'm not so into Javascript programming:
> Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-214) Captcha.jsp not fully localized

Posted by "Florian Holeczek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579764#action_12579764 ] 

Florian Holeczek commented on JSPWIKI-214:
------------------------------------------

I'm not getting any translation of the asirra block at all.
Which Browser are you using? I've been testing it with Firefox 2 and IE7.

Watching the screen it seems as if everything is loaded in the opposite order than you have written. I can read the captcha.description text right from the beginning, while asirra images are still loading. That's why I think the onload function may have been called already before the asirra code is loaded and therefore has no effect. Are you sure that this isn't the case?

Looking at the code again it seems that the table with the id asirra_KnobsTable isn't localized at all.

> Captcha.jsp not fully localized
> -------------------------------
>
>                 Key: JSPWIKI-214
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 2.6.2
>            Reporter: Florian Holeczek
>            Priority: Minor
>
> In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.
> Just an idea, I'm not so into Javascript programming:
> Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-214) Captcha.jsp not fully localized

Posted by "Juan Pablo Santos Rodríguez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579907#action_12579907 ] 

Juan Pablo Santos Rodríguez commented on JSPWIKI-214:
-----------------------------------------------------

Hi Florian,

I've made a fresh install and got Captcha.jsp localized (Ff2, IE7). Can you debug the script to know where it's failing, if you get it executed, etc? In the HTML generated by Captcha.jsp, do you get the i18nAsirra() function with translated strings? The onload function gets called after AsirraClientSide.js, you can test this by debugging with Firebug or by placing several "alert()" inside i18nAsirra and surrounding AsirraClientSide.js 

Regarding asirra_KnobsTable table, you raised one point: there are two anchors with unlocalized title inside it. I'm looking into it right now, should be very easy to fix. Furthermore, I'm giving mainForm a display: none; by default and I'm making it visible after it has been translated, at the end of i18nAsirra(). This should end with the flickering translation effect.

Regards,
jp

> Captcha.jsp not fully localized
> -------------------------------
>
>                 Key: JSPWIKI-214
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 2.6.2
>            Reporter: Florian Holeczek
>            Priority: Minor
>
> In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.
> Just an idea, I'm not so into Javascript programming:
> Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JSPWIKI-214) Captcha.jsp not fully localized

Posted by "Juan Pablo Santos Rodríguez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan Pablo Santos Rodríguez resolved JSPWIKI-214.
-------------------------------------------------

    Resolution: Fixed

fixed asirra_KnobsTable issue in 2.6.2-rc3, changes are on svn now

> Captcha.jsp not fully localized
> -------------------------------
>
>                 Key: JSPWIKI-214
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 2.6.2
>            Reporter: Florian Holeczek
>            Priority: Minor
>
> In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.
> Just an idea, I'm not so into Javascript programming:
> Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-214) Captcha.jsp not fully localized

Posted by "Florian Holeczek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579927#action_12579927 ] 

Florian Holeczek commented on JSPWIKI-214:
------------------------------------------

Ah, good point... I've had a look at the error console and found the following:

{quote}
Fehler: missing ; before statement
Quelldatei: http://localhost:8080/jspwiki/Captcha.jsp
Zeile: 51, Spalte: 131
Quelltext:
          document.getElementById("asirra_AdoptMeDiv" + i).getElementsByTagName("a")[0].innerHTML= '<font size="-1">' + 'Adoptier' mich!' + '</font>' ;
{quote}

I translated "adopt me" with "adoptier' mich", which is pasted by the i18n functions as is and that caused the javascript to become invalid.

So, I'll change this in the final l10n properties file and this issue can be closed after fixing the second part (asirra_KnobsTable).


> Captcha.jsp not fully localized
> -------------------------------
>
>                 Key: JSPWIKI-214
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-214
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 2.6.2
>            Reporter: Florian Holeczek
>            Priority: Minor
>
> In Captcha.jsp, the function i18nAsirra() doesn't produce what it should.
> Just an idea, I'm not so into Javascript programming:
> Maybe this is because the function is called onload of the body, which may be before assira's script http://challenge.asirra.com/js/AsirraClientSide.js is loaded?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.