Advertisement:

Author Topic: [BUG] indonesian language pack error  (Read 733 times)

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
[BUG] indonesian language pack error
« on: April 08, 2018, 04:12:53 am »
this is only happen when i change language as indonesia, and not happen if i use english.

from console, i found this error.
Code: [Select]
dayNamesShort: ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum'at', 'Sabtu'], // For formatting

'Jum'at' should be 'Jum\'at' (indonesian friday)

i try to find the file but i dont found it yet.

oc-admin/themes/modern/parts/footer.php
Code: [Select]
</div><!-- #content -->
    <?php osc_run_hook('admin_footer'); ?>
    </body>
</html>
i dont know how to find file that containts "admin_footer" hook.

also, i try to find it in: osclass\oc-includes\osclass\assets\js
but still no luck

how to find file that containst datepicker initialize?

error found on frontend and backend (admin page).
i find the whole database but still didnt find table that save indonesian day names.

any suggestion?
« Last Edit: April 08, 2018, 06:24:46 pm by plonknimbuzz »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Hi,

Those are translated on-the-fly, you need to fix that in oc-content/languages/[indonesian package]/core.po using Poedit.

Try:

Code: [Select]
msgid "Fri"
msgstr "Jum\'at"

Regards

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
actually i was changed that item before you suggest that.
filename: oc-content/languages/id_ID/core.po

before:
Code: [Select]
#: /var/www/osclass-git/oc-admin/themes/modern/settings/index.php:189
msgid "Friday"
msgstr "Jum'at"

.....

#: /var/www/osclass-git/oc-includes/osclass/helpers/hUtils.php:132
msgid "Fri"
msgstr "Jum'at"
after:
Code: [Select]
#: /var/www/osclass-git/oc-admin/themes/modern/settings/index.php:189
msgid "Friday"
msgstr "Jum'at"

.....

#: /var/www/osclass-git/oc-includes/osclass/helpers/hUtils.php:132
msgid "Fri"
msgstr "Jumat"

even i remove the single quote, error still happen.

is there any cache file?

NOTE: now i still try to install on my VPS, to make sure this only happen on my localhost or my VPS too

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
i try to reinstall language and all normal.

my question is: is language is cached? because when i edit core.po , erro still happen (before i reinstall language)

teseo

  • Hero Member
  • *****
  • Posts: 6169
I'm assuming you are uploading .po and .mo files after editing with Poedit.

Try this way:

Code: [Select]
#: /var/www/osclass-git/oc-admin/themes/modern/settings/index.php:189
msgid "Friday"
msgstr "Jum\\'at"

.....

#: /var/www/osclass-git/oc-includes/osclass/helpers/hUtils.php:132
msgid "Fri"
msgstr "Jum\\'at"

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
no, im not doing that.

after several try. now, i can reproduce the error.

1. make new fresh install and go to admin page
2. install Indonesian language (from market or from upload zip) => both ways will produce same error
3. logout
4. login > select indonesia
5. open console and you will notice the error
« Last Edit: April 08, 2018, 06:18:32 pm by plonknimbuzz »

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
ok. im right, there is cached file to store language.

remove
oc-content/languages/id_ID/core.mo >>cache file (maybe)

edit
oc-content/languages/id_ID/core.po >> edit like tesseo suggested

logout then login > select indonesia

fixed.

if i put core.mo from indonesianLanguage zip  to language folder. error will happen again

is this a bug?



NOTE: thanks tesseo, you save my day
« Last Edit: April 08, 2018, 06:31:14 pm by plonknimbuzz »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: [BUG] indonesian language pack error
« Reply #7 on: April 08, 2018, 07:22:01 pm »
No, .mo it's not a cache file, but the binary version of the .po file (text), and this binary version is what Osclass really uses to translate, so every time you save a .po in Poedit a new .mo is generated and you must upload both new files to your server.

You're welcome :)

Regards

plonknimbuzz

  • Newbie
  • *
  • Posts: 6
Re: [BUG] indonesian language pack error
« Reply #8 on: May 06, 2018, 04:08:03 am »
Hi tesseo
nice to see you again.

yeah i'm totally wrong , its not cache but its binary from poedit. which is i dont know what is poedit before, and i just realize poedit is apps editor to manage translation (https://poedit.net/)

i change jum'at to jum'at like your suggestion, and works like charm

i attach my edited indonesian language pack, so maybe can help some1 else

big thanks for you tesseo

note: recent version: 20130508104424_70_lang_id_ID_3.1
i changed to 20130508104424_70_lang_id_ID_3.2

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: [BUG] indonesian language pack error
« Reply #9 on: May 06, 2018, 01:41:57 pm »
Glad I could help :)

Regards