sibelius / ast-i18n

Easily migrate your existing React codebase to use i18n
MIT License
215 stars 18 forks source link

Translate conditional expressions #46

Open katilius opened 5 years ago

katilius commented 5 years ago

Expanded current test case ExpressionContainer:

import React from "react";

const Simple = ({ enabled }) => (
  <>
    <span>{"My simple text"}</span>
    <span>{enabled ? "OK" : "Not OK"}</span>
    <span>{enabled && enabled}</span>
  </>
);

export default Simple;

The first case works fine, but other 2 are not translated.