Difference between revisions of "Figma to Dev Generation Details"
(→Figma to LRM Development - What changes win?) |
|||
| Line 1: | Line 1: | ||
| + | =Introduction= |
||
| − | For Figma -> Dev, there are both Figma files (translation.json) as well as LRM resource files. |
||
| + | == Figma Projects: For UI/UX designers == |
||
| − | The '''translation.json''' files are located in '''locale''' folders. Each translation.json will be converted to its corresponding LRM resource file. |
||
| + | Designers create interfaces in Figma, use the Figma Lingoport Plugin to push the strings to a Localyzer Figma Project. Those Figma strings can be translated. The translations can be shown in Figma using the Figma Lingoport plugin. |
||
| + | The Figma strings are kept in a repository. This repository is not for developers, it is only for Localyzer. |
||
| − | A Figma LRM resource file may contain both Figma keys and non-Figma keys. |
||
| + | In the Figma repository, files are located in 'figma/locales/<locale>/translation.json'. For example: |
||
| − | A Figma -> Dev project may contain: |
||
| + | * figma/locales/en/translation.json |
||
| − | * Only a base translation.json file. Once a conversion occurs the changes will be in the next prep kit. |
||
| − | * translation.json |
+ | * figma/locales/fr/translation.json |
| + | |||
| + | In the Figma project, keys are created. Those keys will be used to generate the key/value pairs for Figma2Dev project. Keys are located under: |
||
| + | * figma/locales/keys/translation.json |
||
| + | |||
| + | Source strings, translated strings, and keys are all visible from Figma using the Figma Lingoport Plugin. |
||
| + | |||
| + | == Figma2Dev Projects: For software developers == |
||
| + | Software developers can benefit from having resource files generated from the Figma Projects directly in a repository and format of their choice. Key value pairs for the resource files can be generated from the source and target strings of the Localyzer Figma project. To create a Figma to Dev project, see: [[Create_a_Localyzer_only_project#Figma_to_Dev]] |
||
| + | |||
| + | == Changes in Figma projects or Software projects== |
||
| + | After initial translation of Figma project and generation of developer resource files, changes may occur in either. What happens to the generated resources for developers? |
||
| + | |||
| + | |||
| + | == Source Locale == |
||
== Who wins? == |
== Who wins? == |
||
Revision as of 19:59, 26 November 2025
Contents
Introduction
Figma Projects: For UI/UX designers
Designers create interfaces in Figma, use the Figma Lingoport Plugin to push the strings to a Localyzer Figma Project. Those Figma strings can be translated. The translations can be shown in Figma using the Figma Lingoport plugin.
The Figma strings are kept in a repository. This repository is not for developers, it is only for Localyzer.
In the Figma repository, files are located in 'figma/locales/<locale>/translation.json'. For example:
- figma/locales/en/translation.json
- figma/locales/fr/translation.json
In the Figma project, keys are created. Those keys will be used to generate the key/value pairs for Figma2Dev project. Keys are located under:
- figma/locales/keys/translation.json
Source strings, translated strings, and keys are all visible from Figma using the Figma Lingoport Plugin.
Figma2Dev Projects: For software developers
Software developers can benefit from having resource files generated from the Figma Projects directly in a repository and format of their choice. Key value pairs for the resource files can be generated from the source and target strings of the Localyzer Figma project. To create a Figma to Dev project, see: Create_a_Localyzer_only_project#Figma_to_Dev
Changes in Figma projects or Software projects
After initial translation of Figma project and generation of developer resource files, changes may occur in either. What happens to the generated resources for developers?
Source Locale
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