Difference between revisions of "Figma to Dev Generation Details"

From Lingoport Wiki
Jump to: navigation, search
(Figma Projects: For UI/UX designers)
(Figma2Dev Projects: For software developers)
Line 19: Line 19:
 
Source strings, translated strings, and keys are all visible from Figma using the Figma Lingoport Plugin.
 
Source strings, translated strings, and keys are all visible from Figma using the Figma Lingoport Plugin.
   
== Figma2Dev Projects: For software developers ==
+
== 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 '''Developer files''' (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]]
 
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 '''Developer files''' (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]]
   

Revision as of 20:32, 26 November 2025

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, Figma 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 Developer files via the messages.properties intermediary files. The Keys Figma File is located under:

  • figma/locales/keys/translation.json

In parallel, some intermediary Figma Files are created to show the key/value pairs as a preparation step to generating Developer files. Their location follows this pattern:

  • figma/locales/en/messages.properties
  • figma/locales/fr/messages.properties

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 Developer files (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

Developers files, generated or authored by developers, are typically resx, properties, JSON, .strings, strings.xml files.

Edits in Figma Files or Developer Files: Who Wins?

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?

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 the Developer file is overwritten
  • Key in Figma target file has changed since last time generation was run -> Figma wins the Developer files are overwritten
  • Developer changed a Figma key in the Dev resource file and the change was imported -> Developer 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 the Developer files are overwritten
    • After the conversion both the Figma 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