Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3920 closed defect (rejected)

Static pages generation doesn't generate content for some translations

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

Description (last modified by saroyanm)

Environment

Python 2.7

How to reproduce

  1. Download web.adblockplus.org repository content
  2. Check that locales/pl/privacy.json file exists
  3. Run static content generation script
  4. Observe "pl" folder in generated content directory

...

Observed behaviour

No "privacy" file has been generated

Expected behaviour

"privacy" file is being generated with the translated content from locales/pl/privacy.json

Note

In test environment translation for "privacy" works fine, seems like it's also affects other translations.

Change History (19)

comment:1 Changed 4 years ago by saroyanm

  • Description modified (diff)

comment:2 Changed 4 years ago by saroyanm

  • Component changed from Unknown to Sitescripts
  • Keywords CMS added

comment:3 Changed 4 years ago by saroyanm

  • Cc sebastian kzar Shikitita added

@Dave, @Sebastian: Guys can you please help me with current issue, I'll also have deeper look tomorrow morning, hope we can figure out this issue.

comment:4 Changed 4 years ago by saroyanm

  • Blocking 3919 added

comment:5 Changed 4 years ago by saroyanm

  • Description modified (diff)

comment:6 follow-ups: Changed 4 years ago by kzar

  • Resolution set to rejected
  • Status changed from new to closed

The CMS doesn't translate create a localised version of a page if less than 30% of its strings are translated. For the example of the privacy page in the pl locale at the 407d3570da94 revision of web.adblockplus.org only 12% of the strings are translated.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 4 years ago by Shikitita

Replying to kzar:

The CMS doesn't translate create a localised version of a page if less than 30% of its strings are translated. For the example of the privacy page in the pl locale at the 407d3570da94 revision of web.adblockplus.org only 12% of the strings are translated.

Does this mean that Italian, Polish, Greek, Arabic, Japanese, Portuguese and Brazilian Portuguese won't be displayed at all for that section of the website?!

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

comment:8 in reply to: ↑ 6 Changed 4 years ago by saroyanm

Replying to kzar:

The CMS doesn't translate create a localised version of a page if less than 30% of its strings are translated. For the example of the privacy page in the pl locale at the 407d3570da94 revision of web.adblockplus.org only 12% of the strings are translated.

Good to know, thanks for pointing that Dave. Didn't realize about that, would be great to also document that somewhere, but I afraid that this number can change as well in future. Maybe have a small comment above that variable ?

comment:9 in reply to: ↑ 7 Changed 4 years ago by saroyanm

Replying to Shikitita:

Replying to kzar:

The CMS doesn't translate create a localised version of a page if less than 30% of its strings are translated. For the example of the privacy page in the pl locale at the 407d3570da94 revision of web.adblockplus.org only 12% of the strings are translated.

Does this mean that Italian, Polish, Greek, Arabic, Portuguese and Brazilian Portuguese won't be displayed at all for that section of the website?!

@Dave what you think if we will introduce a variable for page that will force the page to be translated even less than 30% is translated ? Because for this page we are planing to link to the section, so would be great to come up with an exception, even if we will try to introduce translation for rest of the page this can lead to linking to the non existing page in future.

comment:10 Changed 4 years ago by sebastian

I think we should always link to the canonical URL (without the language prefix) anyway, which will redirect the user to the page in their language, falling back to English if it doesn't exist (e.g. because it isn't translated).

comment:11 follow-up: Changed 4 years ago by saroyanm

  • Cc mario added

@Mario, is it fine with you if we will link to the canonical version as Sebastian suggested above ?

@Sebatian: should I create another ticket for local test server ? Because the behavior currently is inconsistent between generated content and local test server for the pages that have less than 30% translated.

comment:12 follow-up: Changed 4 years ago by sebastian

I'm not sure whether it's worth to make the test server consistent with the page generation here. But if you think so let's discuss that in a separate issue.

comment:13 in reply to: ↑ 12 Changed 4 years ago by saroyanm

Replying to sebastian:

I'm not sure whether it's worth to make the test server consistent with the page generation here. But if you think so let's discuss that in a separate issue.

Had another thought about that, I think you are right, the inconsistent in that case is helpful, while we can see how the translation will look like as soon more strings will be translated,

comment:14 Changed 4 years ago by kzar

Didn't realize about that, would be great to also document that somewhere

Good point, done!

comment:15 in reply to: ↑ 11 ; follow-up: Changed 4 years ago by mario

Replying to saroyanm:

@Mario, is it fine with you if we will link to the canonical version as Sebastian suggested above ?

We already link to the canonical version so we won't run into errors.

Yet it would be nice if there was an option to force specific pages to show specific languages even though they have less than 30% translated. This might be an edge case, but maybe something we'll stumble upon for other text-heavy pages in the future as well.

Anyway, in case we're limited to to stick to this behavior we'll need to push some translations for this specific site - which would be an option as well.

comment:16 in reply to: ↑ 15 Changed 4 years ago by saroyanm

Replying to mario:

Replying to saroyanm:
Anyway, in case we're limited to to stick to this behavior we'll need to push some translations for this specific site - which would be an option as well.

Having another thought: users can end up on this page with other links as well and they probably will find out that the page only 10% translated to their language, which maybe also something that would be great to avoid.
If be honest I do not have strong opinion how important having exception for this particular case, but on other hand Privacy page is something that would be great to have in more languages IMO.

comment:17 Changed 4 years ago by kzar

  • Cc kzar removed

comment:18 follow-up: Changed 4 years ago by sebastian

If it's important that a particular page is available in all or a particular language, we should simply make sure that it is completely translated, if necessary through the agency.

comment:19 in reply to: ↑ 18 Changed 4 years ago by Shikitita

Replying to sebastian:

If it's important that a particular page is available in all or a particular language, we should simply make sure that it is completely translated, if necessary through the agency.

In this case we'd be talking mainly about the Privacy one and maybe also the Features one. I was talking to Mario about that before and agreed to check with Kai first regarding the Privacy one. If he's happy with the English text, then I could hopefully send it to the agency to have it done. We'll see.

Note: See TracTickets for help on using tickets.