Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensionattributes #324

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Commits on Dec 4, 2016

  1. Nugets now can have recursive parameters (parameters inside parameters).

    e.g.: [[[This %0 allows %1 to have %2|||regex|||nuggets|||(((recursive %0|||(((parameters///comment3)))///comment2)))///comment1]]]  -> This regex allows nuggets to have recursive parameters
    Drizin committed Dec 4, 2016
    Configuration menu
    Copy the full SHA
    6db3b76 View commit details
    Browse the repository at this point in the history
  2. Parameters inside Parameters (parametrized nuggets can be reused insi…

    …de other nuggets): README, Unit test and bug fix.
    Drizin committed Dec 4, 2016
    Configuration menu
    Copy the full SHA
    f428b09 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2016

  1. Conditionals

    With **conditionals** you can use a single nugget tag and have different translations according to the value of parameters.
    
    [[[%0_PRODUCTS_ADDED_TO_ORDER]]] -> "%0{0:No products were added|1:1 product was added|%0 products were added} to your order"
    
    [[[DEAR_SIR_OR_MADAM|||@ViewBag.Gender]]] -> "Dear %0{M:Sir|F:Madam|user}"
    Drizin committed Dec 5, 2016
    Configuration menu
    Copy the full SHA
    cbaffc6 View commit details
    Browse the repository at this point in the history
  2. typo

    Drizin committed Dec 5, 2016
    Configuration menu
    Copy the full SHA
    bc872ee View commit details
    Browse the repository at this point in the history
  3. Extension Attributes

    Conditionals allow you to create conditional translations depending on the argument itself, but sometimes the decision must not be made on something that you know in advance but rather on some language-specific attribute.
    
    Portuguese:
    [[[The %0 is being exported.]]] -> "%0_GENDER{M:O %0 está sendo exportado.|A %0 está sendo exportada.}"
    [[[map]]] -> "mapa"
    [[[map_GENDER]]] -> "M"
    [[[The %0 is being exported.|||(((map)))]]]  -> "O mapa está sendo exportado" (masculine)
    
    French:
    [[[The %0 is being exported.]]] -> "%0_GENDER{M:Le %0 a été exporté.|F:La %0 a été exporté.}"
    [[[map]]] -> "carte"
    [[[map_GENDER]]] -> "F"
    [[[The %0 is being exported.|||(((map)))]]]  -> "Le carte a été exporté" (feminine)
    Drizin committed Dec 5, 2016
    Configuration menu
    Copy the full SHA
    6417eb3 View commit details
    Browse the repository at this point in the history