Ticket #1534 (closed enhancement: fixed)

Opened 14 months ago

Last modified 12 months ago

i18n: sprintf-support for template-translation

Reported by: ischommer Owned by: bfojcapell
Priority: critical Milestone: 2.2.2 feature-lock*
Component: i18n Version:
Severity: medium effort / impact Keywords:
Cc: Hours:

Description

this is basically stopping us from translating some template-parts now (if we don't want to heavily fragment the entities). not very many cases, but would be handy anyway.

Attachments

sprintf.patch (0.8 kB) - added by severin.schols 12 months ago.
apply to sapphire/core/SSViewer.php

Change History

Changed 13 months ago by sminnee

  • priority changed from critical to minor

I'm deprioritising this, but Bernat, it would be good if you could have a look at it as time permits.

Changed 13 months ago by ischommer

  • component changed from Sapphire Framework to i18n

Changed 12 months ago by ischommer

  • priority changed from minor to critical

sam, this shouldn't be marked as "minor" - it prevents people from completing a translation. Especially with the currently high level of active translators we should solve this soon - it will be a lot harder to get people to complete their work later on than provide the opportunity now.

Changed 12 months ago by sminnee

  • milestone set to 2.2.2 feature-lock

Should we try and put this into 2.2.2, then? Bernat, would you be able to get this fix, and the translated entities that sprintf support would allow, completed by 18 Jan 2008?

Changed 12 months ago by severin.schols

since i'm working on making the ecommerce-module translatable for the google highly open participation contest, i created a patch to enable sprintf-support in tempatlates so use for translation. it's used like this (_t function inside of sprintf): <% sprintf(_t(...),$argument) %> it simply translates into the php function, but currently only supports one argument.

Changed 12 months ago by severin.schols

apply to sapphire/core/SSViewer.php

Changed 12 months ago by ischommer

  • status changed from new to closed
  • resolution set to fixed

patched in r46162 - thanks heaps severin! i've added an enhancement ticket to support more than one argument for sprintf: http://open.silverstripe.com/ticket/1952, but thats minor priority for now :)

Note: See TracTickets for help on using tickets.