StringResources.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: Dashboard
  6. *| (C) Copyright IBM Corp. 2017, 2019
  7. *|
  8. *| US Government Users Restricted Rights - Use, duplication or disclosure
  9. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *+------------------------------------------------------------------------+
  11. */
  12. define(['i18n!./DataSourcesResources', '../../lib/@waca/core-client/js/core-client/utils/Lexicon'], function (localeResources, Lexicon) {
  13. 'use strict';
  14. var lexicon = new Lexicon({
  15. data: localeResources,
  16. verbose: true
  17. });
  18. var StringResources = function StringResources() {
  19. return undefined;
  20. };
  21. /**
  22. * Get the string resource for the given key and interpolation options
  23. *
  24. * @param key The key of the string to return
  25. * @param interpolationOptions Optional interpolation options (see poly.t documentation for details)
  26. * @returns The string to display
  27. */
  28. StringResources.prototype.get = function (key, interpolationOptions) {
  29. return lexicon.translate(key, interpolationOptions);
  30. };
  31. return new StringResources();
  32. });
  33. //# sourceMappingURL=StringResources.js.map