DashboardTemplateStringResources.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
  5. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. */
  7. define(['i18n!./DashboardTemplateResources', 'polyglot'], function (dashboardTemplateResources, Polyglot) {
  8. var poly = new Polyglot({
  9. phrases: dashboardTemplateResources,
  10. allowMissing: true
  11. });
  12. var StringResources = function StringResources() {};
  13. /**
  14. * Get the string resource for the given key and interpolation options. Checks the DashboardTemplate resources first and if
  15. * not found it checks the Dashboard resources.
  16. *
  17. * @param key The key of the string to return
  18. * @param interpolationOptions Optional interpolation options (see poly.t documentation for details)
  19. * @returns The string to display
  20. */
  21. StringResources.prototype.get = function (key, interpolationOptions) {
  22. return poly.t(key, interpolationOptions);
  23. };
  24. return new StringResources();
  25. });
  26. //# sourceMappingURL=DashboardTemplateStringResources.js.map