Nullpointer for "de" in xForms.js

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Nullpointer for "de" in xForms.js

Karolin Heiss
Hey Orbeon,

I use Orbeon Forms 3.8.0.post.201008310232 CE.

My DatePicker does not work because xForms.js throws a Nullpointer because there are no resources for "de". Can you please extend the calendar RESOURCES and set a default language if there are no resources for a special language:


xForms.js Line 4142...

            // Get language from html/@lang
            var lang = ORBEON.util.Dom.getAttribute(document.documentElement, "lang");
            // If not language is set there, use English
            if (lang == null || lang == "")
                lang = "en";
            // Just keep first 2 letters (fr_FR becomes fr)
            lang = lang.substring(0, 2);
            // Find resource for selected language
            var resources = RESOURCES[lang];if(resources==null)resources = RESOURCES["en"];
            // set English resources if there are no resources for given language
            if (resources == null)
              resources = RESOURCES["en"];
            for (var key in resources.properties)
            ...



        "de": {
            properties: {
                "MONTHS_LONG": [ "Januar", "Februar", "März", "April", "Mai", "Juni", "July", "August",  "September",  "Oktober",  "November",  "Dezember" ],
                "WEEKDAYS_SHORT": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                "START_WEEKDAY": 0
            },
            navigator: {
                month: "Monat",
                year: "Jahr",
                submit: "OK",
                cancel: "Abbrechen",
                invalidYear: "jahr muss eine Zahl sein"
            }
        }

Thank you,
Karolin
Reply | Threaded
Open this post in threaded view
|

Re: Nullpointer for "de" in xForms.js

Karolin Heiss
Still the same error with orbeon-3.8.201009100400-CE

orbeon-3.8.201009100400-CE\WEB-INF\lib\orbeon-resources-public.jar\ops\javascript\xforms.js
Reply | Threaded
Open this post in threaded view
|

Re: Nullpointer for "de" in xForms.js

Erik Bruchez
Administrator
In reply to this post by Karolin Heiss
Karolin,

This is now integrated.

Bug:
http://forge.ow2.org/tracker/index.php?func=detail&aid=315534&group_id=168&atid=350207

Commit:
http://github.com/orbeon/orbeon-forms/commit/e1ff0e3d156bbd700538d5460a9a0fa366c00f45

-Erik

On Thu, Sep 2, 2010 at 8:28 AM, Karolin Krieg <[hidden email]> wrote:

>
> Hey Orbeon,
>
> I use Orbeon Forms 3.8.0.post.201008310232 CE.
>
> My DatePicker does not work because xForms.js throws a Nullpointer because
> there are no resources for "de". Can you please extend the calendar
> RESOURCES and set a default language if there are no resources for a special
> language:
>
>
> xForms.js Line 4142...
>
>            // Get language from html/@lang
>            var lang =
> ORBEON.util.Dom.getAttribute(document.documentElement, "lang");
>            // If not language is set there, use English
>            if (lang == null || lang == "")
>                lang = "en";
>            // Just keep first 2 letters (fr_FR becomes fr)
>            lang = lang.substring(0, 2);
>            // Find resource for selected language
>            var resources = RESOURCES[lang];if(resources==null)resources =
> RESOURCES["en"];
>            // set English resources if there are no resources for given
> language
>            if (resources == null)
>              resources = RESOURCES["en"];
>            for (var key in resources.properties)
>            ...
>
>
>
>        "de": {
>            properties: {
>                "MONTHS_LONG": [ "Januar", "Februar", "März", "April",
> "Mai", "Juni", "July", "August",  "September",  "Oktober",  "November",
> "Dezember" ],
>                "WEEKDAYS_SHORT": ["So", "Mo", "Di", "Mi", "Do", "Fr",
> "Sa"],
>                "START_WEEKDAY": 0
>            },
>            navigator: {
>                month: "Monat",
>                year: "Jahr",
>                submit: "OK",
>                cancel: "Abbrechen",
>                invalidYear: "jahr muss eine Zahl sein"
>            }
>        }
>
> Thank you,
> Karolin
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Nullpointer-for-de-in-xForms-js-tp2524355p2524355.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws