locale_test.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Drupal.t("Standard Call t");
  2. Drupal
  3. .
  4. t
  5. (
  6. "Whitespace Call t"
  7. )
  8. ;
  9. Drupal.t('Single Quote t');
  10. Drupal.t('Single Quote \'Escaped\' t');
  11. Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't');
  12. Drupal.t("Double Quote t");
  13. Drupal.t("Double Quote \"Escaped\" t");
  14. Drupal.t("Double Quote " + "Concat " + "strings " + "t");
  15. Drupal.t("Context Unquoted t", {}, {context: "Context string unquoted"});
  16. Drupal.t("Context Single Quoted t", {}, {'context': "Context string single quoted"});
  17. Drupal.t("Context Double Quoted t", {}, {"context": "Context string double quoted"});
  18. Drupal.t("Context !key Args t", {'!key': 'value'}, {context: "Context string"});
  19. Drupal.formatPlural(1, "Standard Call plural", "Standard Call @count plural");
  20. Drupal
  21. .
  22. formatPlural
  23. (
  24. 1,
  25. "Whitespace Call plural",
  26. "Whitespace Call @count plural"
  27. )
  28. ;
  29. Drupal.formatPlural(1, 'Single Quote plural', 'Single Quote @count plural');
  30. Drupal.formatPlural(1, 'Single Quote \'Escaped\' plural', 'Single Quote \'Escaped\' @count plural');
  31. Drupal.formatPlural(1, "Double Quote plural", "Double Quote @count plural");
  32. Drupal.formatPlural(1, "Double Quote \"Escaped\" plural", "Double Quote \"Escaped\" @count plural");
  33. Drupal.formatPlural(1, "Context Unquoted plural", "Context Unquoted @count plural", {}, {context: "Context string unquoted"});
  34. Drupal.formatPlural(1, "Context Single Quoted plural", "Context Single Quoted @count plural", {}, {'context': "Context string single quoted"});
  35. Drupal.formatPlural(1, "Context Double Quoted plural", "Context Double Quoted @count plural", {}, {"context": "Context string double quoted"});
  36. Drupal.formatPlural(1, "Context !key Args plural", "Context !key Args @count plural", {'!key': 'value'}, {context: "Context string"});