WordPress.org

Ready to get started?Download WordPress

Forums

Codestyling Localization
[resolved] Uncaught TypeError: Object , has no method 'empty' (3 posts)

  1. DcBexter
    Member
    Posted 1 year ago #

    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/

  2. DcBexter
    Member
    Posted 1 year ago #

    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)

  3. codestyling
    Member
    Plugin Author

    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.