crowdin-cli icon indicating copy to clipboard operation
crowdin-cli copied to clipboard

Support the new fbtee format

Open cpojer opened this issue 5 months ago • 6 comments

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?

cpojer avatar Jul 09 '25 00:07 cpojer