Local setup - Translations are not pulled

Hi, I’m trying to run pontoon locally using docker and makefiles.
I had successfully run the pontoon and now I’m trying to integrate it with my test repo.
I’ve created the project, sync is successful due to logs, but the translations are not pulled. Console output argues:

[ERROR:pontoon.sync.vcs.models] 2021-08-23 22:10:45,448 Skipping resource languages/pontoon/ru.po due to ParseError: Failed to parse /app/media/projects/urgn-test/git@github.com:urgn/tms_testing.git/templates/languages/pontoon/ru.pot: Syntax error in po file None (line 1)

Then I created the .pot file using msgfilter but new keys did not appear.

[DEBUG:pontoon.sync.vcs.models] 2021-08-23 22:15:39,170 Detected resource file languages/pontoon/en.po for en,ru,uk
[DEBUG:pontoon.sync.vcs.models] 2021-08-23 22:15:39,175 Parsing resource file: /app/media/projects/urgn-test/urgn/tms_testing/en/languages/pontoon/en.po

Here’s my test repo: https://github.com/urgn/tms_testing/tree/main/languages/pontoon

What am I doing wrong?

Hi @urgn,

Seems like you’ve made some changes to the file & folder structure since you’ve tried pulling. Please put the tms-test.pot file in the templates folder and you’re good!

@mathjazz thank you for your response, indeed I did not succeed with applying your advice

Now my folder structure looks like this:

./languages/pontoon/
├── en
│   └── tms-test.po
├── ru
│   └── tms-test.po
├── templates
│   └── tms-test.pot
└── uk
    └── tms-test.po

And my pontoon project settings:

My l10n.toml file is present at repo root with following contents

[[paths]]
reference = "languages/pontoon/templates/tms-test.pot"
l10n = "languages/pontoon/{locale}/tms-test.po"
locales = [ "en", "ru", "uk"]

But translations still not synced, with similar message:

[DEBUG:pontoon.sync.vcs.models] 2021-08-30 18:23:03,600 Detected resource file languages/pontoon/uk/tms-test.po for en,ru,uk
[ERROR:pontoon.sync.vcs.models] 2021-08-30 18:23:03,613 Skipping resource languages/pontoon/uk/tms-test.po due to ParseError: Failed to parse /app/media/projects/urgn-test/git@github.com:urgn/tms_testing.git/templates/languages/pontoon/uk/tms-test.pot: Syntax error in po file None (line 1)

The second option of configuration I’ve tried:

.
├── languages
│   └── pontoon
│       ├── en
│       │   └── tms-test.po
│       ├── ru
│       │   └── tms-test.po
│       └── uk
│           └── tms-test.po
└── templates
    └── tms-test.pot

The project settings are the same, but the configuration file is not used.

Errors remains similar

[DEBUG:pontoon.sync.vcs.models] 2021-08-30 18:42:50,347 Detected resource file languages/pontoon/en/tms-test.po for en,ru,uk
[ERROR:pontoon.sync.vcs.models] 2021-08-30 18:42:50,351 Skipping resource languages/pontoon/en/tms-test.po due to ParseError: Failed to parse /app/media/projects/urgn-test/git@github.com:urgn/tms_testing.git/templates/languages/pontoon/en/tms-test.pot: Syntax error in po file None (line 1)

And

DEBUG:pontoon.sync.vcs.models] 2021-08-30 18:42:50,398 Detected resource file templates/tms-test.po for en,ru,uk
[DEBUG:pontoon.sync.vcs.models] 2021-08-30 18:42:50,402 Parsing resource file: /app/media/projects/urgn-test/git@github.com:urgn/tms_testing.git/templates/languages/pontoon/en/templates/tms-test.po
[ERROR:pontoon.sync.vcs.models] 2021-08-30 18:42:50,402 Skipping resource templates/tms-test.po due to ParseError: Failed to parse /app/media/projects/urgn-test/git@github.com:urgn/tms_testing.git/templates/languages/pontoon/en/templates/tms-test.po: Syntax error in po file None (line 1)

Is there any sample working project with similar setup I can use as an example?

You first option looks good, except that you need to remove the check in front of “Source repo” as well as the reference to the l10n.toml file in case you have it specified in the project admin.

1 Like

@mathjazz thanks, now it works!