Project

General

Profile

Bug #12646

Make the Partners pages translatable

Added by u 4 months ago. Updated 14 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Fundraising
Target version:
Start date:
06/06/2017
Due date:
% Done:

100%

QA Check:
Pass
Feature Branch:
Type of work:
Website
Blueprint:
Easy:
Affected tool:

Description

wiki/src/partners.mdwn and wiki/src/partners/become.mdwn shall be translatable.
As this requires coordination with , here is a ticket to make this happen, as requested in #6972#note-44


Related issues

Blocked by Tails - Feature #6972: Create a "Partners" page Resolved 05/05/2017
Blocked by Tails - Feature #12518: Add a toggle for previous partners Resolved 05/05/2017

Associated revisions

Revision 99fa75bb
Added by intrigeri 28 days ago

Merge remote-tracking branch '451f/feature/12518+toggle_partners'

Closes: #12518, #12646, #14565

Revision cbee8c97 (diff)
Added by intrigeri 28 days ago

Partners page: close <span> tags and ensure all content is between (p) tags.

refs: #12646

History

#1 Updated by u 4 months ago

#2 Updated by intrigeri 4 months ago

  • Subject changed from Make Partners pages translatable to Make the Partners pages translatable
  • Category set to Fundraising
  • Target version set to Tails_3.1

#3 Updated by intrigeri 4 months ago

#4 Updated by intrigeri 4 months ago

#5 Updated by intrigeri 4 months ago

  • Description updated (diff)

#6 Updated by intrigeri 4 months ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

I've verified that the content is indeed translatable once I add it to po_translatable_pages (modulo the raw HTML that'll be painful, as always when we mix HTML and Markdown) so it'll be easy for me to do once #6972 is done \o/

#7 Updated by sajolida 4 months ago

u: Maybe you could try to rename this page as HTML and see if the added complexity on the page itself by adding HTML tags is worth it as the resulting PO files will be easier to translate (in principle without raw HTML).

That's a aspect of ikiwiki that I often forget.

#8 Updated by u 4 months ago

  • Feature Branch set to 451f:tails/feature/12518+toggle_partners

I've proposed such a change as part of the work on #12518. Once this is merged and reviewed, I'll reassign this ticket to intrigeri.

#9 Updated by u 4 months ago

#10 Updated by intrigeri 4 months ago

  • Target version deleted (Tails_3.1)

Please move this back onto my radar, by setting a target version again, once the blocker is done :)

#11 Updated by u 3 months ago

  • Target version set to Tails_3.1
  • QA Check set to Ready for QA

I assigned the blocker for review to you now, because it's been waiting for a long time already and blocks this ticket. There is just a tiny piece of JS to review.

#12 Updated by intrigeri 3 months ago

  • Assignee changed from intrigeri to u
  • Target version changed from Tails_3.1 to Tails_3.2
  • QA Check deleted (Ready for QA)

(Blocked by something whose target version was set to 3.2 a few days ago, and about which I need more info.)

#13 Updated by u 29 days ago

  • Assignee changed from u to intrigeri
  • QA Check set to Ready for QA

Looks like I should reassign this to you now.

#14 Updated by intrigeri 28 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 10 to 100

#15 Updated by intrigeri 28 days ago

  • Status changed from Resolved to In Progress
  • Assignee changed from intrigeri to u
  • % Done changed from 100 to 80
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch changed from 451f:tails/feature/12518+toggle_partners to web/12646-translatable-partners

woohoo! I've merged the branch. It's better than the HTML-inside-Markdown version, but the resulting PO files still seem pretty daunting => error-prone => I expect translators will make mistakes: all the content that follows each <span class="clearfix"> results in a single translatable string. It seems that the deeply nested structure created by these span's is a hard sell for po4a, ditto for the fact lots of content is not enclosed within tags.

I've pushed a branch that makes the structure better from po4a's perspective: each sponsor entry is now extracted as its own translatable string, and there's very little HTML left in these strings. But this is far outside of my skill set, and I've no idea if that makes sense semantically; besides, it does break some CSS (the 2nd and following sponsors on a line are now on the next line, which is ugly). So perhaps my branch can go to the trash, but I hope refreshing PO files from my branch will at least show you what I expect this ticket to produce in the end :)

#16 Updated by u 27 days ago

Ouh ouh ouh :(

#17 Updated by u 27 days ago

  • Target version changed from Tails_3.2 to Tails_3.3

Let's be honest: postponing this.

#18 Updated by u 14 days ago

  • Assignee changed from u to intrigeri

intrigeri wrote:

woohoo! I've merged the branch. It's better than the HTML-inside-Markdown version, but the resulting PO files still seem pretty daunting => error-prone => I expect translators will make mistakes: all the content that follows each <span class="clearfix"> results in a single translatable string. It seems that the deeply nested structure created by these span's is a hard sell for po4a, ditto for the fact lots of content is not enclosed within tags.

But this only happens because the po plugin wants to translate the link titles while I think that this is absolutely unnecessary. These titles only specify how much each sponsor gave and their full name (as opposed to just their logo). These names should not be translateable either..

I've pushed a branch that makes the structure better from po4a's perspective: each sponsor entry is now extracted as its own translatable string, and there's very little HTML left in these strings. But this is far outside of my skill set, and I've no idea if that makes sense semantically; besides, it does break some CSS (the 2nd and following sponsors on a line are now on the next line, which is ugly). So perhaps my branch can go to the trash, but I hope refreshing PO files from my branch will at least show you what I expect this ticket to produce in the end :)

So what you did from what I can see is that you want me to transform the <span>s to <p>s, because the po plugin seems to create a new string for each paragraph. Is that correct?

I see that there is some faulty markup actually, maybe this is the root cause of the problem.

#19 Updated by u 14 days ago

  • Assignee changed from intrigeri to u

I'm trying to fix it.

#20 Updated by u 14 days ago

I think it works better now, but still, in the po files I see similar things:

 19 #. type: Content of: outside any tag (error?)
 20 msgid "[[!meta title=\"Partners\"]]" 
 21 msgstr "" 

While I think this should not happen. Any idea why this happens?

#21 Updated by u 14 days ago

  • Assignee changed from u to intrigeri
  • QA Check changed from Dev Needed to Ready for QA
  • Feature Branch deleted (web/12646-translatable-partners)

I let you verify the current state of things which I permitted myself to push to master.

#22 Updated by intrigeri 14 days ago

But this only happens because the po plugin wants to translate the link titles while I think that this is absolutely unnecessary.

FYI, unfortunately there's no way to tell po4a (used by the PO plugin to extract strings from the English page source) that specific strings are not meant to be translatable (let alone part of specific strings, as you would like).

#23 Updated by intrigeri 14 days ago

  • Status changed from In Progress to Resolved

I think it works better now,

Yes! I've checked the generated PO files and AFAICT that's the best we can possibly get from po4a. Congrats!

but still, in the po files I see similar things:

>  19 #. type: Content of: outside any tag (error?)
>  20 msgid "[[!meta title=\"Partners\"]]" 
>  21 msgstr "" 
> 

While I think this should not happen. Any idea why this happens?

po4a parses partners.html, identifies a problem and reports it. It has no clue about the template this content will be injected into, nor about ikiwiki special [[!directive ...]] syntax. So in the current state of things, what you see is expected and cannot easily be fixed. I count 280 other occurrences of this comment in our PO files, excluding partners.*.po, so apparently we can live with it just fine :)

#24 Updated by intrigeri 14 days ago

I let you verify the current state of things

It's good so I've closed this ticket \o/

which I permitted myself to push to master.

This worked because my review discovered no new problem that would force us to update the HTML source and in turn the PO file. Keep in mind that at least one translation team is very fast at updating their PO files, so if I had identified issues, there's a possibility they would have translated the current version (they have already translated the previous one) before you had a chance to fix the problems, and then in total they would have translated essentially the same text (formatted differently) 3 times, which doesn't look fun. Localizable text is an area where the incremental improvement approach has its limits. But really I don't blame you and it worked just fine: indeed, what you pushed to the master branch did fix all the previously identified problems so I agree it was a safe bet to make :)

#25 Updated by intrigeri 14 days ago

  • Assignee deleted (intrigeri)
  • % Done changed from 80 to 100
  • QA Check changed from Ready for QA to Pass

Also available in: Atom PDF