Skip to content
Snippets Groups Projects
  1. Aug 05, 2018
  2. Aug 01, 2018
  3. Jul 28, 2018
    • Thijs Kinkhorst's avatar
      Sort language drop down by language code. · a90ab966
      Thijs Kinkhorst authored
      This seemed the logical place to do it, because it's essentially
      a presentation thing (so in Template, not Locale). There's likely
      something to be said for sorting by key aswell as sorting by
      translated language name. Picked key for now, seems most predictable.
      a90ab966
  4. May 31, 2018
  5. May 11, 2018
  6. Apr 13, 2018
  7. Feb 07, 2018
  8. Jan 06, 2018
  9. Jan 04, 2018
  10. Dec 31, 2017
    • Thijs Kinkhorst's avatar
      Sort language drop down by language code. · 45a8a9c3
      Thijs Kinkhorst authored
      This seemed the logical place to do it, because it's essentially
      a presentation thing (so in Template, not Locale). There's likely
      something to be said for sorting by key aswell as sorting by
      translated language name. Picked key for now, seems most predictable.
      45a8a9c3
  11. Dec 06, 2017
  12. Oct 25, 2017
  13. Oct 19, 2017
  14. Oct 17, 2017
    • Jaime Pérez Crespo's avatar
      Add a "translateFromArray" filter to twig. · 840f2242
      Jaime Pérez Crespo authored
      This allows us to use this new filter to translate strings from a given array of translations, where every translation is indexed by its ISO 639 code. A new configuration option ('language' -> 'priorities') is available too to control the alternative languages that can be used instead of a given language, when the latter is not found. The filter returns null when no suitable translation is found, so that it can be combined with "default()" to set a default translation for a given string.
      Unverified
      840f2242
  15. Oct 10, 2017
  16. Aug 03, 2017
  17. Jul 18, 2017
  18. Jul 05, 2017
  19. Jul 04, 2017
    • Jaime Pérez Crespo's avatar
      Do not automatically load all the template directories of all modules. · 7ec9caa0
      Jaime Pérez Crespo authored
      It has also an impact in performance, and covers an unlikely scenario. Instead, if you plan to use templates from another module, now you need to call the "addTemplatesFromModule()" method right after creating the template. That way you can register manually what templates you are supposed to use, being much more efficient.
      Unverified
      7ec9caa0
    • Jaime Pérez Crespo's avatar
      Remove the 'templateInit' hook. · a506502b
      Jaime Pérez Crespo authored
      An alternative way to inject data in the templates should be used. This has a terrible impact in performance, and could have undesired side effects.
      Unverified
      a506502b
    • Jaime Pérez Crespo's avatar
      Add a method to get the twig object used in a template. · d0e09690
      Jaime Pérez Crespo authored
      This allows template users to use their own twig extensions if they want, while also allowing us to remove the "twigInit" hook. Hooks come at a price, and it doesn't make much sense to use them in this case, as they would only be useful if a module wants to add a twig extension even if the code instantiating SimpleSAML_XHTML_Template does not belong to that module. This could lead to unexpected behaviour (i.e. a module adding a hook that creates trouble for the templates defined in another module), so given the lack of use cases supporting the hook and the possible negative consequences implied, it's better to remove it.
      Unverified
      d0e09690
  20. Apr 22, 2017
  21. Mar 30, 2017
  22. Feb 14, 2017
  23. Feb 09, 2017
  24. Oct 25, 2016
  25. Oct 11, 2016
  26. Oct 07, 2016
  27. Oct 04, 2016
    • Jaime Pérez's avatar
      bugfix: Start using the twig-i18n wrapper. · bcd08412
      Jaime Pérez authored
      Since the class names were prepended with "\", the original extension was used, instead of our own wrapper. This fixes that issue, and sets the two new methods in SimpleSAML\Locale\Translate as the functions to use to replace the calls to gettext() and ngettext(). Support for the old translation system is still missing for twig templates.
      bcd08412
Loading