@procore/labs-custom-translations
Allows users to add translation equivalents to a default
Last updated 2 months ago by dancingshell .
SEE LICENSE IN LICENSE · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @procore/labs-custom-translations 
SYNC missed versions from official npm registry.

Custom Translations

A modal that edits source translations in different locales

Installation

yarn add @procore/labs-custom-translations

Requirements

Peer dependencies

  • @procore/core-react > 8.18
  • @procore/labs-jsskit ^ 2.1.1
  • react-dom ^ 16.12.0
  • styled-components ^ 5.2.0

Translations

Include these translations

<%= translation_include_tag('company_admin_settings') %>

Example usage

import React from 'react';
import { I18nProvider } from '@procore/core-react';
import { ThemeProvider } from 'styled-components';
import { createTheme } from '@procore/labs-jsskit';
import { translationModalLoader } from "@procore/labs-custom-translations"

function WrapperComponent({children}) {
  return (
    <ThemeProvider theme={createTheme()}>
      <I18nProvider I18n={(window as any).I18n}>
        {children}
      </I18nProvider>
    </ThemeProvider>
  )
}


translationModalLoader(WrapperComponent, 'open-translations-config');

Server API

API documentation page.

Current Tags

  • 0.1.0-alpha                                ...           alpha (2 months ago)
  • 0.1.0                                ...           latest (2 months ago)

2 Versions

  • 0.1.0                                ...           2 months ago
  • 0.1.0-alpha                                ...           2 months ago

Copyright 2014 - 2016 © taobao.org |