Skip to content

Support the new fbtee format #931

@cpojer

Description

@cpojer

Hello Crowdin folks,

fbtee is a modern rewrite of Facebook's fbt. It used to work fine with Crowdin until recently, but the file format of source_strings.json was slightly changed:

Before:

{
      "hashToLeaf": {
        "a3ruXfPRZE9V0OoG50TZsA==": {
          "desc": "In the phrase: \"An internationalization framework for JavaScript & React designed to be {=powerful}, {=flexible}, and {=intuitive}.\"",
          "text": "intuitive"
        }
      },
      "filepath": "src/App.tsx",
      "col_beg": 14,
      "col_end": 76
      "line_beg": 164,
      "line_end": 164,
      "project": "",
      "jsfbt": {
        "m": [],
        "t": {
          "desc": "In the phrase: \"An internationalization framework for JavaScript & React designed to be {=powerful}, {=flexible}, and {=intuitive}.\"",
          "text": "intuitive"
        }
      }
    },

After:

{
      "hashToLeaf": {
        "a3ruXfPRZE9V0OoG50TZsA==": {
          "desc": "In the phrase: \"An internationalization framework for JavaScript & React designed to be {=powerful}, {=flexible}, and {=intuitive}.\"",
          "text": "intuitive"
        }
      },
      "filename": "src/App.tsx",
      "loc": {
        "start": {
          "line": 164,
          "column": 14,
          "index": 5838
        },
        "end": {
          "line": 164,
          "column": 76,
          "index": 5900
        }
      },
      "project": "",
      "jsfbt": {
        "m": [],
        "t": {
          "desc": "In the phrase: \"An internationalization framework for JavaScript & React designed to be {=powerful}, {=flexible}, and {=intuitive}.\"",
          "text": "intuitive"
        }
      }
    },

The difference is the new loc prob for location information, and filepath was changed to filename. Would you be able to support the new format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    import/exportThis is related to the import/export functionality in Crowdin. It is probably not related to the CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions