Opened 4 years ago

Closed 4 years ago

#2936 closed change (fixed)

[cms] Support syntax for translatable strings with existing default value

Reported by: kzar Assignee: kzar
Priority: Unknown Milestone:
Module: Sitescripts Keywords: cms
Cc: trev, saroyanm Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29324503/

Description

Background

Currently our CMS supports translatable strings with a syntax like {{string_name[optional comment] Default language value}}. This works great until we want to re-use the same string. We then have to duplicate the whole default language string value. (It can also lead to mistakes, if there are multiple different values specified for a string then all but one will be lost.)

What to change

Add a new shorter syntax for strings that have been used previously {{string_name}}.

  • If the string _hasn't_ been used previously, and therefore a default value has not already been specified an exception should be thrown.
  • Otherwise the existing default value / translation should be used.

Change History (2)

comment:1 Changed 4 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 4 years ago by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.