123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2014, 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['i18n!../../dashboard/nls/DashboardResources', 'i18n!./DashboardResources', 'polyglot'], function (titanResources, geminiResources, Polyglot) {
- var titanPoly = new Polyglot({
- phrases: titanResources,
- allowMissing: true
- });
- var geminiPoly = new Polyglot({
- phrases: geminiResources
- });
- var StringResources = function () {
- function StringResources() {
- _classCallCheck(this, StringResources);
- }
- /**
- * Get the string resource for the given key and interpolation options
- *
- * @param {string} key The key of the string to return
- * @param {object} [interpolationOptions] see poly.t documentation for details
- * @returns {string} The corresponding string for the given key
- */
- StringResources.prototype.get = function get(key, interpolationOptions) {
- var msg = titanPoly.t(key, interpolationOptions);
- if (msg === key) {
- msg = geminiPoly.t(key, interpolationOptions);
- }
- return msg;
- };
- return StringResources;
- }();
- ;
- return new StringResources();
- });
- //# sourceMappingURL=StringResources.js.map
|