StringResources.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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!./DashboardLWResources', 'jquery', '../../../lib/@waca/core-client/js/core-client/utils/Lexicon'], function (localeResources, $, Lexicon) {
  13. 'use strict';
  14. var lexicon = new Lexicon({ data: localeResources, verbose: true });
  15. var StringResources = function StringResources() {
  16. return undefined;
  17. };
  18. /**
  19. * Get the string resource for the given key and interpolation options
  20. *
  21. * @param key The key of the string to return
  22. * @param interpolationOptions Optional interpolation options (see poly.t documentation for details)
  23. * @returns The string to display
  24. */
  25. StringResources.prototype.get = function (key, interpolationOptions) {
  26. return lexicon.translate(key, interpolationOptions);
  27. };
  28. return new StringResources();
  29. });
  30. //# sourceMappingURL=StringResources.js.map