Difference between revisions of "Figma to Dev Generation Details"

From Lingoport Wiki
Jump to: navigation, search
(Figma to LRM Development - What changes win?)
Line 1: Line 1:
  +
For Figma -> Dev, there are both Figma files (translation.json) as well as LRM resource files.
= Figma to LRM Development - What changes win? =
 
  +
  +
The '''translation.json''' files are located in '''locale''' folders. Each translation.json will be converted to its corresponding LRM resource file.
  +
  +
A Figma LRM resource file may contain both Figma keys and non-Figma keys.
  +
  +
A Figma -> Dev project may contain:
  +
* Only a base translation.json file. Once a conversion occurs the changes will be in the next prep kit.
  +
* translation.json files for all locales (default and target).
  +
  +
== Who wins? ==
  +
Here are some scenarios that may occur when editing both Figma and LRM resource files:
  +
* Key in Figma base file has changed since last time generation was run -> '''Figma wins'''
  +
* Key in Figma target file has changed since last time generation was run -> '''Figma wins'''
  +
* Developer changed a Figma key in the LRM resource file and the change was imported -> '''LRM wins'''
  +
** However, the changes will be overlayed once a Figma file has changed for the same key
  +
* Both Figma base file and its corresponding Figma target file have changed since last time generation was run -> '''Figma wins'''
  +
** After the conversion both the LRM resource base file and target file have changed
  +
** There will be no NOT_IN_LRM error that usually occurs when both the base and target files have the same new key.
  +
  +
== Figma -> Dev generation restrictions ==
  +
* There can be no outstanding prep kits
  +
* Parser type must support generation. The following parser types '''do not support Figma -> Dev generation'''.
  +
** text
  +
** binary
  +
** html
  +
** xhtml
  +
* Parser types such as ''json'' or ''yaml'' cannot have language or global tags defined

Revision as of 00:16, 25 November 2025

For Figma -> Dev, there are both Figma files (translation.json) as well as LRM resource files.

The translation.json files are located in locale folders. Each translation.json will be converted to its corresponding LRM resource file.

A Figma LRM resource file may contain both Figma keys and non-Figma keys.

A Figma -> Dev project may contain:

  • Only a base translation.json file. Once a conversion occurs the changes will be in the next prep kit.
  • translation.json files for all locales (default and target).

Who wins?

Here are some scenarios that may occur when editing both Figma and LRM resource files:

  • Key in Figma base file has changed since last time generation was run -> Figma wins
  • Key in Figma target file has changed since last time generation was run -> Figma wins
  • Developer changed a Figma key in the LRM resource file and the change was imported -> LRM wins
    • However, the changes will be overlayed once a Figma file has changed for the same key
  • Both Figma base file and its corresponding Figma target file have changed since last time generation was run -> Figma wins
    • After the conversion both the LRM resource base file and target file have changed
    • There will be no NOT_IN_LRM error that usually occurs when both the base and target files have the same new key.

Figma -> Dev generation restrictions

  • There can be no outstanding prep kits
  • Parser type must support generation. The following parser types do not support Figma -> Dev generation.
    • text
    • binary
    • html
    • xhtml
  • Parser types such as json or yaml cannot have language or global tags defined