Skip to content

Conversation

@wed150
Copy link

@wed150 wed150 commented Dec 20, 2025

  • Add langs/zh_CN.lang file
  • Change script files to adapt to Chinese

Copy link
Owner

@ForestOfLight ForestOfLight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for translating Construct to Chinese!
First, thanks for catching these issues and fixing them:

  1. The relative path that was too long for the Raycaster in BlockInfo.
  2. The missing block sound error.
  3. The "isntance" typo.

Please revert all changes that aren't in the RP/texts folder or aren't the fixed issues mentioned above. This is for consistency and not misleading users:

Many types of strings are made to be translated, but block states do not fall into that category. Block states are hardcoded values and players may need to read them as their lower-level values. Also, since it is hardcoded, it would conflict with the other translations of this addon.
Using the ItemStack's localizationKey when looking at a block permutation may be inaccurate. It is better to wait until v26.0 when the permutation's type translation key can be used directly rather than using the ItemStack's translation key.
Could you explain the dimension translation issue? Though I see that it's currently not implemented, using the localizationKey for each dimension should work in theory.

@wed150
Copy link
Author

wed150 commented Dec 30, 2025

Thank you for translating Construct to Chinese! First, thanks for catching these issues and fixing them:

  1. The relative path that was too long for the Raycaster in BlockInfo.
  2. The missing block sound error.
  3. The "isntance" typo.

Please revert all changes that aren't in the RP/texts folder or aren't the fixed issues mentioned above. This is for consistency and not misleading users:

Many types of strings are made to be translated, but block states do not fall into that category. Block states are hardcoded values and players may need to read them as their lower-level values. Also, since it is hardcoded, it would conflict with the other translations of this addon. Using the ItemStack's localizationKey when looking at a block permutation may be inaccurate. It is better to wait until v26.0 when the permutation's type translation key can be used directly rather than using the ItemStack's translation key. Could you explain the dimension translation issue? Though I see that it's currently not implemented, using the localizationKey for each dimension should work in theory.

About Dimensions Translation

The dimension translation is now implemented in the new commit

About Block ID Usage

If directly using block IDs, then for some special blocks (like piston arms), we may need to define them in the .lang files.

Translation Solution for Hard-coded Block States.

For hard-coded Block States, I believe they can be incorporated into lang files using the following approach:

  1. Map the original string of its block state to a custom localization key name through mapping.
  2. Define them in the language file.

Due to translation issues it might be difficult to express clearly, so please take a look at my new commit

@wed150
Copy link
Author

wed150 commented Dec 30, 2025

Regarding the block state translation part in the code, it is only a suggestion. I hope you can add the translatability feature for this part in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants