StringResources.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. *
  6. * IBM Cognos Products: dashboard-livewidget
  7. *
  8. * (C) Copyright IBM Corp. 2019
  9. *
  10. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. */
  12. /**
  13. * THIS IS ONLY USED FOR THE SERVICEABILITY PANEL. WE DO NOT SUPPORT TRANSLATION FOR SERVICEABILITY
  14. * DO NOT SEND IT FOR TRANSLATION
  15. */
  16. define(['i18n!./LwServiceabilityResources', 'polyglot'], function (ServiceabilityResources, Polyglot) {
  17. var poly = new Polyglot({
  18. phrases: ServiceabilityResources,
  19. allowMissing: true
  20. });
  21. var StringResources = function () {
  22. function StringResources() {
  23. _classCallCheck(this, StringResources);
  24. }
  25. /**
  26. * Get the serviceability string resource for the given key and interpolation options
  27. *
  28. * @param key The key of the string to return
  29. * @param {Object} [interpolationOptions] interpolation options (see poly.t documentation for details)
  30. * @returns The string to display
  31. */
  32. StringResources.prototype.get = function get(key, interpolationOptions) {
  33. return poly.t(key, interpolationOptions);
  34. };
  35. return StringResources;
  36. }();
  37. return new StringResources();
  38. });
  39. //# sourceMappingURL=StringResources.js.map