This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Create Translation Files
Lin Yu-Chieh (Victor) edited this page Aug 12, 2021
·
3 revisions
If the language you want does not exist here, you can create your own.
Below are instructions and guidelines on how to create these files.
- Check here for status of translations to different languages, and record yourself on the list once you've started translating
- If someone is already working on a language, it is advised that you work on another language or collaborate with that translator;
however, if you wish to do your own translations, it is still welcomed - If the translation and English is the same, at the translator's discretion, that component may be removed from the translation file, since the plugin defaults to English when there's no translation
- If you're revising a translation, add your name behind the previous translator, separated with comma
,
- Do not discredit other by removing their names
- Save the translation as a .txt/.json file
- Do a pull request if you've done some translations; alternatively, send the translations to me thru email
- Take a look at my Traditional Chinese translation
- File starts and ends with square brackets
[ ]
- Each component info is stored in curly brackets
{ }
- Each component have 2 necessary and 1 optional info, each starts with a label(as below) followed by a colon
:
and its value stored in double quotes" "
:- name: EXACT English full name of the component
- translation: translation/description of component
- category: the category of the component, ie: Params/Maths..etc, this is needed to differentiate between component of same name [Optional]
- Each info for a component is separated by a comma
,
- Each component is also separated by a comma
,
- Translator credits info is treated as a component without category:
- name: "*Translator*",
- translation: "Translator's Name"
For Component translations:
Last line in translation file:
- This file type does NOT work with Version 2.X and onwards
- Take a look at my Traditional Chinese translation
- Each line is one component translation
- Each line starts with the EXACT English full name of the component
- An equal sign
=
directly follows the English full name, without any spaces in between - The translation directly follows the equal sign
=
, without any spaces in between - The last line in the file follows the format
*Translator*="Translator's Name"
Follows the guidelines as above.
- These are for the native vanilla grasshopper components
- File name can be whatever you want (normally the language you're translating to), the exact wording will show in the language options
Plugin translations follows the same guidelines as above with a few extras:
- Each translation file is one plugin
- File name MUST start with the
plugin name
(as displayed on the GH tab) followed by underscore_
, you're free to name it whatever after the underscore_
(normally the language you're translating to)- For example:
Weaverbird
shows up asWb
in GH tabs, so an example of the file name would beWb_Japanese
for translations to Japanese
- For example:
- Do NOT include category in translation data, as it's already in the filename
- An example here (translation for Robots plugin)
Translation for the UI of the plugin, tooltips, message...etc
- These are for Version 2.X onwards, for Version 1.X, scroll to the bottom
- File name MUST start with
UILang_
, you can name it whatever afterwards (normally the language you're translating to)- For example:
UILang_Japanese
for translations to Japanese
- For example:
- There are 20 translate-able UI elements:
-
Version
- Followed by numbers to indicate the version of the plugin -
TipEnable
- Tooltip of "Version" option, indicating its function when clicked -
LanguageUI
- Menu name for "UI Language" -
Methods
- Menu name for "Display Method" -
MBubble
- Label for "Bubble Annotation" option -
MText
- Label for "Text Annotation" option -
TextSize
- Menu name for "Text Size" -
ReAnnotate
- Label for "Refresh Annotation" option -
Save
- Label for "Save As Default" option -
Reload
- Label for "Reload Files" option -
ExcludeDefault
- Label for "Default Exclusions" option -
ExcludeUser
- Label for "Custom Exclusions" option -
ShowEng
- Label for "Show English Below" option -
DisplayName
- Menu name for "Display Name Type" -
DFull
- Label for "Full Name" option -
DNick
- Label for "Nickname" option -
DCustom
- Label for "Custom Name" option -
DCustomFull
- Label for "Custom w/ Full Name" option -
DCustomNick
- Label for "Custom w/ Nickname" option -
Missing
- Dialog message displayed when a missing/invalid JSON file is selected.
-
- Example can be found here
Image for reference:
- As there are hundreds of components in grasshopper, it'll take a while to translate them all, do not feel obligated to translate every single one
- My Traditional Chinese translation file does not cover all the vanilla components, if you wish to add additional components, feel free to do so
- But do not mix vanilla components and downloaded plugin components in the same file
- You can start from the Pure Text Blank Template OR JSON Blank Template
- Alternatively you can create a JSON template using the Translators Tools, as seen in this demo here
- A pure text translation file can be converted to JSON by using the Translators Tools, as seen in this demo here
- Depending on your speed of translation, it's recommended that you upload you progress every 100 components or so, this will give the community a chance to review your translations in case of typos and such. This also creates visible activity and keeps the momentum going
- You can use this file to check your translations for RH7 vanilla components
Translation for the UI of the plugin, tooltips, message...etc
- File name MUST start with
UILang_
, you can name it whatever afterwards (normally the language you're translating to)- For example:
UILang_Japanese
for translations to Japanese
- For example:
- There are 20 translate-able UI elements:
-
Version
- followed by numbers to indicate the version of the plugin -
Disabled
- shown underneath the MGH component when not enabled -
TranslationBy
- used where credits are shown, shown before translator names -
CompDes
- Description of the MGH component -
CompIn
- Name of the input of MGH component -
CompInDes
- Description of the input of MGH component -
UseTextLabel
- shown as the "Use Text Label" toggle text in the right click menu of MGH component -
UseDefaultExclusions
- shown as the text of "Use Default Exclusions" toggle -
CustomExclusions
- shown as the text of "Custom Exclusions" toggle in the toolbar menu -
KeepAnnotations
- shown as the text of "Keep Annotations" toggle -
NoNickname
- shown as the text of "Show Full Names" -
NicknamePreferred
- shown as the text of "Prefer Nicknames" -
NicknameOnly
- shown as the text of "Only Custom Nicknames" -
ShowEnglish
- shown as the text of "Show English with Translation" -
SaveAsDefault
- shown as the text of "Save As Default" option in the toolbar menu -
SaveDeTooltip
- shown as tooltip of "Save As Default" option in the toolbar menu -
TooMany
- shown in a message box when user tries to use more than one MGH component -
MenuDisabled
- shown as tooltip on the toolbar menu option when MGH component in use -
NoDoc
- shown as tooltip on the toolbar menu option when no GH document is open -
ClickEnable
- shown as tooltip on the enable toggle in the toolbar menu
-
- Example can be found here
Image for reference: