• Members 3 posts
    Aug. 7, 2017, 1:01 p.m.

    I'm new in django and web development. Misago app is really great, I like it, thank you very much. Now I'm trying to localize misago by my self. I have already partly filled in both .po files, but got some strange behaviour:

    • While page is loading the page is fully translated, but when loading process is finished, some items get untranslated.
    • While my browser language is set to English everyhing is ok, but when I set it to Russian (my locale) most of the buttons get unavailable and I can't post, reply or like posts.

    When I remove ru folder at locale/ the second issue gets gone. The first issue still exists, but seems django uses poor standard .po files.

    Could you show me the way to search the solution?

  • arrow_forward
  • Members 3 posts
    Aug. 7, 2017, 3:49 p.m.

    Thank you very much!

    My plural forms entry seems to be ok.

    The reason for the first problem was in .po files content overlapping. Django takes translated line from django.po first and then replaces it with untranslated djangojs.po line (currently both files are filled partly).

    It's a bit inconvenient, it is necessary to control overlapped lines translation match for both files. Anyway, as I finish the translation the first problem gonna be solved. But I'm not sure about the second one. I will check it soon =)

  • Aug. 7, 2017, 11:59 p.m.

    Hey,

    This is incorrect actually. I've explained the mechanic elsewhere but it nails down to this:

    Misago is actually two applications that are working together to create complete experience. There is Django application that lives on server and then there is JavaScript application that lives in browser. django.po contains messages that are used by server application, and djangojs.po contains messages that are used by JavaScript application. You can't use django.po for both server and browser applications for performance reasons - there's no way to decide which message is used by browser application without either making this application ask the server every time (this would cause dozens of backend hits and be terribly slow), or just loading all of the messages available (which would likely produce few megabytes of needless baggage. Instead approach is used in which untranslated messages are extracted from JavaScript application to separate djangojs.po file.

    What you are seeing is in fact server html (which uses django.po for translations) that is replaced by browser html generated by JavaScript app that uses djangojs.po instead.

    This means that JavaScript application failed to start. You will need to look at your browser's console to see error messages from your JavaScript.

  • Members 3 posts
    Aug. 8, 2017, 9:01 a.m.

    Yes, I meant the same thing. I just thought, whether it is necessary to display data from the server, if they are later replaced with data obtained from JS at client side.

    You're totally right. Could you give me an idea how to fix it?

    lh3.googleusercontent.com/rMAFknX_1Iqrg1o8ktP9tFRS-tu-ioYJkyDamjTUG5IOZQmsHJEZ9g4I4DRd9EDbbu9AWGxdlIFApJ04GD_UfivrqE1LlB0K5MYHLbRAkbd8CEtbjb-oEWM40GyhtVPiVEAk6hcAWlD9TRhgEBeYPar7Lo1_I8dBdLICdtAxs-evyuAvs4Z-3-rjo0vlRQoCitDTO3e-sdWZ3ZTIsdNgP2PfVcnETs_gnYeJCRU5RIXsqsKHNCnEidyxgb_Wxu4eS6Yc-YDOIGcMeKr8tuqf4y7QG_yXX30jvaReaPsPhYaZzdKuTy1CgIRLJOhjlZTo5yQ4mggoMbLV4OfFc1Q0qEiWqdTNbXnZS42I5VJTIR5bIu9VEVvsv2MdYrBssLU9E0hm2kcl13JfI7YJGyWHrw8wHUr51zDIYFIj-PuX-U9b1fqfAETouwxBVvOXqpeRsp_iw29cJYazB6aSzZW3It77fuZx2kjzjY72Z9erlSu70UPwbGcAlSQuIc0QutfJtt6vuPJKF11Wm_i8kysOAe0j-FDAQAyovejrhofrjvLv6AUnfsBLLeVYfB3yUsSjfNXCibUgzKLc6u--JIg7qisCOWTPHcRKKgArb2inaR8GdPnXpIC-HCBE=w673-h177-no

  • Aug. 12, 2017, 11:50 p.m.

    I've just noticed that you've tried to link to screenshot, but apparently its only visible to you as google displays "denied" roadsign for me.