Hi @nogaman
You’re right, Crowdin’s standard ARB import ignores the x-locations array because it’s Angular-specific metadata, not a standard ARB context field. This means Crowdin won’t automatically map it to “File context.”
Some possible solutions for adding x-locations
as Context:
-
Pre-processing Script: This is the most flexible and recommended approach. Before uploading your ARB files, run a script to modify them. The script would extract the
file
andline
fromx-locations
and inject this info into the string’sdescription
field (Crowdin does import thedescription
). -
Custom File Format: For more control, you could define a custom file format in Crowdin to specifically parse
x-locations
and map them to a context field. This requires a bit more setup. -
In-Context Localization: While not using the
x-locations
data directly, integrating Crowdin’s In-Context tool into your Angular app provides the best visual context. Translators see strings live in your UI, which is often more valuable than a file path.