Problem
I have two files, apple.json and banana.json, with the following structure:
apple.json
{
"red_apple": "Red Apple"
}
banana.json
{
"yellow_banana": "Yellow Banana"
}
However, the platform detects these phrases as the same phrase, even though their string value is different and exist in separate files.
Answer
Our platform detects phrases by their key, or string identifiers, and will not look at the string value or file. All strings must have a unique key.
Comments
2 comments
Thus, we will count a placeholder as one word to compensate the effort of translators to take care of them. Same concept applies to HTML tags or any words or numbers that need not to be translated like r2park
Hello,
The provided response correctly identifies the issue and offers a clear solution.
Explanation:
Platform Behavior: The platform relies on the "key" within the JSON objects for phrase identification. In this case, both files lack unique keys.
apple.json: The key is "red_apple"
banana.json: The key is "yellow_banana"
Problem: Since the platform only considers the keys, it treats "red_apple" and "yellow_banana" as distinct phrases, even though their string values differ.
Solution: To resolve this, assign unique keys to each string value within the JSON files. For example:
JSON
apple.json
{
"fruit_apple_red": "Red Apple"
}
banana.json
{
"fruit_banana_yellow": "Yellow Banana"
}
By implementing unique keys:
The platform will accurately identify each string as a separate phrase.
This ensures proper handling and processing of each string within your application.
This approach provides a robust and efficient solution for managing and identifying phrases within your platform.
Best Regards
Maryland Health Connection gov
Please sign in to leave a comment.