Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper content of localized_content.json #1

Open
Vinyasha opened this issue May 13, 2020 · 0 comments
Open

Proper content of localized_content.json #1

Vinyasha opened this issue May 13, 2020 · 0 comments

Comments

@Vinyasha
Copy link

Hello, Charles!

Would you please help me a bit on how to create a proper localized_content.json?
I didn't find anything in the documentation about it.
Currently, I have the following file structure

{
  "handofftest": {
    "articles": [
      {
        "bump_ok": true,
        "comments": "MK",
        "deferred_id": null,
        "en_images": false,
        "hc": "testhc",
        "id": 1111111111111111,
        "locale": "de-de",
        "title": Test Article Title",
        "writer": ""
      },
      1111111111111111
    ]
  }
}

And I've got the following error:

Traceback (most recent call last):
  File "zlo.py", line 81, in <module>
    args.func(args)             # call the default function
  File "zlo.py", line 47, in publish
    ho.register_new_localized_content(deliverable)
  File "C:\Users\m_kopylova\Documents\zlo-master\modules\handoff.py", line 286, in register_new_localized_content
    print(localized_content[article['locale']]['articles'])
KeyError: 'de-de'

I understand that the issue is in JSON content but have no clue how to form it correctly.
Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant