Git Product home page Git Product logo

react-tinacms-i18n's People

Contributors

chrisdmacrae avatar dirtyf avatar jbevis avatar logan-anderson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-tinacms-i18n's Issues

Move from tsdx to jest + tina-scripts

Install required deps:

npm i tina-scripts rollup rollup-plugin-commonjs rollup-plugin-replace rollup-plugin-typescript2 rollup-plugin-uglify typescript typescript-plugin-styled-components

Then update package scripts:

  "scripts": {
    "start": "npm run watch",
    "watch": "tinacms-scripts watch",
    "dev": "tinacms-scripts dev",
    "build": "tinacms-scripts build",
    "test": "jest --passWithNoTests"
  }

Then update "main" and "types" of package.json:

  "main": "build/index.js",
  "types": "build/index.d.ts",

Add support for managing localized blocks

Add a custom action for blocks controls to allow managing an “active” localization for blocks.

This allows the developer to expose these controls to end users, and get and display the correct data on demand.

It should support 2 modes:

a hot swap, and a “display all” toggle mode.

Hot swap is a drop down as a radio list.

Toggle mode is a drop down as a checkbox list.

Refactor to monorepo

We want a:

  • tinacms-i18n package that contains:
    • only the vanilla JS logic (e.g, the api client)
  • react-tinacms-i18n package that contains:
    • react abstractions for this suite, plus;
    • re-exports tinacms-i18n

Add default locale to API options

Set default on the provider or when constructing the API, and it will default to that language on load, UNLESS currentLocale is applied, in which case that is used instead.

take out react-tinamcs-prompts

react-tinacms-prompts is its own repo so it can be taken out of this one

  • update readme
  • update code to import tina-cms-prompts

Locale should have labels for Region and Language

instead of the language referring to the language code, it should refer to the code and a label.
Example:
Instead of

locale  = {
  region: "ca",
  language: "en",
}

it should be

locale = {
  region: {
         code: 'ca',
         label: 'Canada'
    },
   language: {
      code: 'en',
      label: 'English' 
   }
}

There should also be a way to fetch this data async

Allow the sorting of the toolbar widget to be configured by region first, or language first

Right now we default to:

  • Showing a list of regions (if present) + a list of languages w/o region
  • Selecting a region results in a push to a sub-menu to select the language for that region
  • Selecting a language w/o region selects that locale

We want:

  • Context to take an "sortBy" prop, which can be language, region
  • If sortBy is language, then the initial list is all languages, and:
    • If that language has regions, we push to a menu that lets you select the raw language (if it is a locale on its own) or the regionalized language
  • If sortBy is region, we keep the current behaviour, but move languages w/o regions to the top of the list instead of the bottom.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.