You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The translation is for an Android application's UI. Use terminology and phrasing consistent with android applications. Do not change the meaning of the text.
@@ -49,29 +48,33 @@
49
48
5. **Dialect and Regional Vocabulary:**
50
49
Use native vocabulary for the specified dialect (e.g., **Português de Portugal**), avoiding terms from other variants.
51
50
52
-
6. **Output Requirements:**
51
+
6. **General Note:**
52
+
Preserve all proper nouns, feature names, and trademarked or branded terms in their original English form.
53
+
54
+
7. **Output Requirements:**
53
55
Return ONLY the final translated text as a single plain line, preserving any required formatting from the source.
54
56
55
57
"""
56
58
57
59
PLURAL_GUIDELINES_ADDITION="""\
58
-
6. **Plural Resources:**
60
+
7. **Plural Resources:**
59
61
For plural translations, if the source resource contains only a single plural key (e.g., "other") but the target language requires multiple plural forms, return all the appropriate plural keys for the target language.
60
62
*Example:* If the English source is `<item quantity="other">%d day left</item>`, the Portuguese translation should include both `<item quantity="one">%d dia restante</item>` and `<item quantity="many">%d dias restantes</item>`. Ensure that each plural form reflects the proper singular and plural usage with the correct one, many etc as defined by the target language's standard usage. Use the target language's pluralization guidelines as a reference to determine which keys to include and their corresponding forms.
61
63
The full set supported by Android is zero, one, two, few, many, and other.
62
64
63
-
7. **Output Requirements:**
65
+
8. **Output Requirements:**
64
66
Return ONLY a JSON object containing the translated plural mapping as a single plain line. Do not include any markdown formatting, code blocks, or additional commentary, except if any such formatting is already present in the source string provided.
65
67
"""
66
68
67
69
SYSTEM_MESSAGE_TEMPLATE="""\
68
-
You are a software engineer translating textual UI elements within a software application from English into {target_language} while keeping technical terms in English.
70
+
You are a software engineer translating textual UI elements within an Android from English into {target_language} while keeping technical terms in English.
69
71
"""
70
72
71
73
TRANSLATE_FINAL_TEXT="""\
72
-
Translate the following resource for an Android app provided after the dashed line to the following values-{target_language}/string.xml language: {target_language}
74
+
Translate the following resource for an Android app provided after the dashed line to the following values-{target_language}/string.xml for the language: {target_language}
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The action supports the following inputs:
99
99
| **resources_paths** | Paths to the Android resource directories. Typically includes directories such as `app/src/main/res`, `library/src/main/res`, etc. If not provided, this action will search throughout the entire project folder (which is the default). | `${{ github.workspace }}` | Yes | `./app/src/main/res, ./library/src/main/res, ./feature/src/main/res` | | **resources_paths | **
100
100
|**auto_translate**| Automatically translate missing resources. Set to `false` to disable auto-translation. |`"true"`| Yes |`"true"` or `"false"`|
101
101
|**log_trace**| Enable detailed logging. Use `"true"` for verbose output. |`"false"`| Yes |`"true"`|
102
-
|**openai_model**| Specify the OpenAI model to use for translation. We advise using `gpt-3.5-turbo`. |`"gpt-3.5-turbo"`| Yes |`"gpt-3.5-turbo"`, `"gpt-4o"`|
102
+
|**openai_model**| Specify the OpenAI model to use for translation. We advise using `gpt-4o-mini`. |`"gpt-4o-mini"`| Yes |`"gpt-3.5-turbo"`, `"gpt-4o"`|
103
103
|**project_context**| Additional project context to include in translation prompts. |`""`| Yes |`"Android launcher application"`|
104
104
|**ignore_folders**| Comma-separated list of folder names to ignore during resource scanning (e.g., build). |`"build"`| Yes |`"build,temp,cache"`|
0 commit comments