How to use the i18n-js.t function in i18n-js

To help you get started, we’ve selected a few i18n-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Sage / carbon / src / __experimental__ / components / form / form.spec.js View on Github external
it('if form is dirty, return a message and trigger a popup', () => {
      wrapper.setState({ formInputs: { foo: 'foo' } });
      expect(wrapper.instance().checkIsFormDirty(Event))
        .toEqual(I18n.t('form.save_prompt',
          { defaultValue: 'Do you want to leave this page? Changes that you made may not be saved.' }));
    });
github Sage / carbon / demo / views / pages / home / sage-loves-carbon / sage-loves-carbon.js View on Github external
export default props => (
  <div>
    
      <div>
        
        
          { I18n.t('homepage.sage_loves_carbon.learn_more') }
        
      </div>
      <img src="{">
    
  </div>
);
github catarse / catarse.js / src / root / project-edit-reward.js View on Github external
)

                                ] : ''
                            ),
                            m('.w-col.w-col-4',
                                m('.card.u-radius', [
                                    m('.fontsize-small.u-marginbottom-20', [
                                        m('span.fa.fa-lightbulb-o.fa-lg'), 
                                        m.trust(` ${I18n.t('reward_know_more_cta_html', I18nScope())}`)
                                    ]),
                                    m('.divider.u-marginbottom-20'),
                                    m('.fontsize-smallest.w-hidden-small.w-hidden-tiny', [
                                        I18n.t('reward_faq_intro', I18nScope()),
                                        m('br'),
                                        m('br'),
                                        I18n.t('reward_faq_sub_intro', I18nScope()),
                                        m('br'),
                                        m('br'),
                                        _.map(ctrl.tips,
                                            (tip, idx) => project().mode === 'sub' && (Number(idx) === 3 || Number(idx) === 4)
                                                ? null : [
                                                    m('.fontweight-semibold', tip.title),
                                                    m.trust(tip.description),
                                                    m('br'),
                                                    m('br')
                                                ]
                                        )
                                    ])                                        
                                ])
                            )
                        ])
                    ])
github Sage / carbon / src / __deprecated__ / components / textarea / textarea.js View on Github external
get characterCount() {
    const value = this.props.value || '';

    if (!this.props.characterLimit) { return null; }
    return (
      <div data-element="character-limit">
        { I18n.t('textarea.limit.prefix', { defaultValue: 'You have used ' }) }
        <span>
          { I18n.toNumber(value.length, this.i18nNumberOpts) }
        </span>
        { I18n.t('textarea.limit.middle', { defaultValue: ' of ' }) }
        <span>
          { I18n.toNumber(this.props.characterLimit, this.i18nNumberOpts) }
        </span>
        { I18n.t('textarea.limit.suffix', { defaultValue: ' characters' }) }
      </div>
    );
  }
github OpenConext / OpenConext-manage / manage-gui / src / pages / API.jsx View on Github external
onChange={e =&gt; this.setState({fullTextSearch: e.target.value})}
               onKeyPress={e =&gt; e.key === "Enter" ? this.doSearch(e) : false}/&gt;
         this.setState({logicalOperatorIsAnd: !this.state.logicalOperatorIsAnd})}/&gt;
        <section>
          <a>Reset<i></i></a>
          <a>Search<i></i></a>
          <a>
            {I18n.t("clipboard.copy")}<i></i>
          </a>
        </section>
        {hasNoResults &amp;&amp; <h2>{I18n.t("playground.no_results")}</h2>}
        {showResults &amp;&amp; <select> ({value: s, label: I18n.t(`metadata.${s}`)}))}
                                value={status}
                                className="status-select"/&gt;}
        {showResults &amp;&amp; this.renderSearchResultsTable(searchResults, selectedType, searchAttributes, globalSearchAttributes, status, fullTextSearch)}
        {showResults &amp;&amp; this.renderSearchResultsTablePrintable(searchResults)}
      
    );
  };
</select>
github OpenConext / OpenConext-manage / manage-gui / src / components / metadata / EntityId.jsx View on Github external
setErrorMessage(errorType) {
        let errorMessage;

        switch (errorType) {
            case "notPresent":
                errorMessage = I18n.t("metadata.required", {
                    name: "Entity ID"
                });
                break;
            case "notUnique":
                errorMessage = I18n.t("metadata.entityIdAlreadyExists", {
                    entityid: this.props.value
                });
                break;
            case "notFormatted":
                errorMessage = I18n.t("metaDataFields.error", {
                    format: this.props.entityIdFormat
                });
                break;
            default:
                errorMessage = "";
        }

        this.setState({errorMessage});
        return false;
    }
github NREL / api-umbrella / src / api-umbrella / admin-ui / app / components / stats / query-form.js View on Github external
id: 'api_key',
          label: I18n.t('admin.stats.fields.api_key.label'),
          description: I18n.t('admin.stats.fields.api_key.description_markdown'),
          type: 'string',
          operators: stringOperators,
        },
        {
          id: 'user_email',
          label: I18n.t('admin.stats.fields.user_email.label'),
          description: I18n.t('admin.stats.fields.user_email.description_markdown'),
          type: 'string',
          operators: stringOperators,
        },
        {
          id: 'user_id',
          label: I18n.t('admin.stats.fields.user_id.label'),
          description: I18n.t('admin.stats.fields.user_id.description_markdown'),
          type: 'string',
          operators: stringOperators,
        },
        {
          id: 'response_status',
          label: I18n.t('admin.stats.fields.response_status.label'),
          description: I18n.t('admin.stats.fields.response_status.description_markdown'),
          type: 'integer',
          operators: numberOperators,
        },
        {
          id: 'gatekeeper_denied_code',
          label: I18n.t('admin.stats.fields.gatekeeper_denied_code.label'),
          description: I18n.t('admin.stats.fields.gatekeeper_denied_code.description_markdown'),
          type: 'string',
github gaoxiaosong / react-native-im / standard / page / ChooseUser.tsx View on Github external
.catch(() => {
                    Toast.show(i18n.t('IMToastError', {
                        action: i18n.t('IMLoadOrganization')
                    }));
                });
        }
github status-im / ens-usernames / app / components / ens / terms.js View on Github external
<dialog open="{open}">
    
      {lang.t('terms.title')}
      
        
          <li>{lang.t('terms.funds_deposit')}</li>
          <li>{lang.t('terms.funds_release')}</li>
          <li>{lang.t('terms.names_creation', { stateofus: <i>stateofus.eth</i> })}</li>
          <li>{lang.t('terms.contract', { stateofus: <i>stateofus.eth</i> })}</li>
          <li>{lang.t('terms.rule.title')}
            <ol type="1">
              <li>{lang.t('terms.rule.one')}</li>
              <li>{lang.t('terms.rule.two')}</li>
              <li>{lang.t('terms.rule.three')}</li>
              <li>{lang.t('terms.rule.four', { reserved_list_link: <a href="https://github.com/status-im/ens-usernames/blob/master/config/ens-usernames/reservedNames.js">{lang.t('terms.reserved_list')}</a> })}</li>
              <li>{lang.t('terms.rule.five', { eth_address: <code>Ox</code> })}</li>
            </ol>
          </li>
          <li>{lang.t('terms.illegal_name')}</li>
          <li>{lang.t('terms.contact')}</li>
        
      

      <div style="{{">
        
          <div>{lang.t('action.send_snt')}</div>
        
      </div></dialog>