_getMessageForKey(key, locale) {
    if (!key || key.indexOf(':') === -1) {
      throw new Error(
        `Namespace is missing in the key "${key}". The format for keys is "namespace:name".`,
      );
    }
    const [ns, namesString] = key.split(':');
    const namespaces = this.__storage[locale];
    const messages = namespaces ? namespaces[ns] : {};
    const names = namesString.split('.');
    const result = names.reduce(
      /**
       * @param {Object<string, any> | string} message
       * @param {string} name
       * @returns {string}
       */
      (message, name) => (typeof message === 'object' ? message[name] : message),
      messages,
    );

    return String(result || (this._showKeyAsFallback ? key : ''));
  }
@param {string | undefined} key
@param {string} locale
@returns {string}
@throws {Error} `key`is missing namespace. The format for `key` is "namespace:name"
@protected