Support » Plugin: Codestyling Localization » Uncaught TypeError: Object , has no method 'empty'

  • Resolved DcBexter

    (@dcbexter)


    The Plugin works fine with 99% of the languages, but when I try to translate Turkish, it won’t let me change the page or use the other filters like “not translated”.

    Everytime I try to change the page, the console prints this error message:
    Uncaught TypeError: Object , has no method ’empty’ in /turkish/wp-admin/tools.php?page=codestyling-localization/codestyling-localization.php:1768 csp_change_pagenum

    http://wordpress.org/extend/plugins/codestyling-localization/

Viewing 2 replies - 1 through 2 (of 2 total)
  • DcBexter

    (@dcbexter)

    I fixed it by editing line 4445 in codestyling-localization.php

    from […](!csp_pofile[csp_idx.cur[i]].val.empty() ? […]
    to […](!csp_pofile[csp_idx.cur[i]].val[pl].empty() ? […]

    I don’t know if this has any effect on other languages but at least I can use the navigation now.

    If I look at the contents of ‘csp_num_plurals’, it gives me “1” in Turkish and “3” in the other languages. Shouldn’t this be the same? (The theme is the same in all Languages and there are 3 Plurals on the site)

    Plugin Author codestyling

    (@codestyling)

    I have adjusted the Turkish plural forms to nplurals=2; plural=(n>1); as written here: http://translate.sourceforge.net/wiki/l10n/pluralforms
    Will be available with update to version 1.99.30

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught TypeError: Object , has no method 'empty'’ is closed to new replies.