Opened 4 years ago

Last modified 8 weeks ago

#3507 new defect

Translation sync script for web.adblockplus.org generates separate json files for each platform for homepage instead of index.json

Reported by: saroyanm Assignee:
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: kzar, Shikitita, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Python 2.7

How to reproduce

  1. Run translation synchronization script for adblockplus.org.
  2. Navigate to https://crowdin.com/project/webadblockplusorg/en
  3. Look for index.json

Observed behaviour

No index.json in crowdin project for web.adblockplus.org

Expected behaviour

Translation synchronization script should generate one index.json file and upload to crowdin instead of creating separate .json files for each platform.

Change History (4)

comment:1 Changed 4 years ago by kzar

  • Cc sebastian added
  • Component changed from Unknown to Sitescripts

I'm not sure about this ticket. On the one hand I see where you're coming from, it's a waste translating these separate and identical JSON files for each page. But on the other hand I see why it is working that way. As far as the CMS is concerned those pages really are separate, even though in reality they all only contain a single include.

It seems to me the problem is more with how we've chosen to create those pages chrome.md, edge.md, firefox.md, internet-explorer.md, maxthon.md, opera.md, safari.md and yandex-browser.md.

  • Perhaps there's a different way we can create those pages that doesn't result in the same waste?
  • Perhaps there's a way for the CMS to automatically, or manually, avoid submitting JSON files that are identical? (But how do we make this intuitive, and avoid things going wrong if the page's contents diverge?)

comment:2 Changed 4 years ago by sebastian

  • Cc trev added

I agree that it's an issue (not only for the homepage on adblockplus.org) that strings from included files are duplicated in the translation file of the page they are included in. Though, with the current approach, I'm not sure how we could easily fix that. But we probably have to.

However, the resulting translation file shouldn't probably be located under locales/*/index.json as that would refer to pages/index.tmpl which just coincidentally doesn't have own strings, but otherwise would introduce a conflict here. So the resulting translation file here should rather be located under locales/*/includes/index.json (or something like that).

Last edited 4 years ago by sebastian (previous) (diff)

comment:3 Changed 23 months ago by fhd

  • Cc trev removed

comment:4 Changed 8 weeks ago by kvas

Dear stakeholders of this ticket,

I'm cleaning up Sitescripts tickets in Trac due to its phase out. This is one of the tickets that I could not myself close or move, so I need your input on it.

Please let me know if this ticket is still relevant for you and we can then discuss where it should be moved. If you think that this ticket is no longer relevant, you can write a comment explaining this or just ignore this message.

If I see now comments in the ticket on October 14, I will close it as rejected.

Best regards,
Vasily

Note: See TracTickets for help on using tickets.