This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch releases-0.12
in repository https://gitbox.apache.org/repos/asf/fory.git

commit 248ca3968203870e9c10fc32f7efe80dc1e747fe
Author: Asnowww <[email protected]>
AuthorDate: Sun Aug 24 16:12:07 2025 +0800

    chore: translate Chinese comments into English (#2503)
    
    <!--
    **Thanks for contributing to Fory.**
    
    **If this is your first time opening a PR on fory, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fory** community has requirements on the naming of pr
    titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
    
    - Fory has a strong focus on performance. If the PR you submit will have
    an impact on performance, please benchmark it first and provide the
    benchmark result here.
    -->
    
    ## What does this PR do?
    
    <!-- Describe the purpose of this PR. -->
    chore: translate Chinese comments into English
    ## Related issues
    
    <!--
    Is there any related issue? Please attach here.
    
    - #xxxx0
    - #xxxx1
    - #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fory/issues/new/choose) describing the
    need to do so and update the document if necessary.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    -->
---
 java/benchmark/src/main/proto/bench.proto                  |  2 +-
 .../src/main/java/org/apache/fory/codegen/Expression.java  |  3 +--
 javascript/packages/fory/lib/meta/MetaString.ts            | 14 +++++++-------
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/java/benchmark/src/main/proto/bench.proto 
b/java/benchmark/src/main/proto/bench.proto
index e10e13689..0e1ec7597 100644
--- a/java/benchmark/src/main/proto/bench.proto
+++ b/java/benchmark/src/main/proto/bench.proto
@@ -37,7 +37,7 @@ message Bar {
   optional int64 f6 = 6;
   optional float f7 = 7;
   optional double f8 = 8;
-  repeated int32 f9 = 9; // proto不支持int16
+  repeated int32 f9 = 9; // proto does not support int16
   repeated int64 f10 = 10;
 }
 
diff --git 
a/java/fory-core/src/main/java/org/apache/fory/codegen/Expression.java 
b/java/fory-core/src/main/java/org/apache/fory/codegen/Expression.java
index 0d9e236e2..f5135bcb6 100644
--- a/java/fory-core/src/main/java/org/apache/fory/codegen/Expression.java
+++ b/java/fory-core/src/main/java/org/apache/fory/codegen/Expression.java
@@ -2432,8 +2432,7 @@ public interface Expression {
           action.apply(
               new Reference(i),
               new Reference(leftElemValue, leftElemType, true),
-              // elemValue nullability check uses isNullAt inside action, so 
elemValueRef's nullable is
-              // false.
+              // elemValue nullability check uses isNullAt inside action, so 
elemValueRef's nullable is false.
               new Reference(rightElemValue, rightElemType, false));
       ExprCode elementExprCode = elemExpr.genCode(ctx);
 
diff --git a/javascript/packages/fory/lib/meta/MetaString.ts 
b/javascript/packages/fory/lib/meta/MetaString.ts
index 92453d216..f7678d369 100644
--- a/javascript/packages/fory/lib/meta/MetaString.ts
+++ b/javascript/packages/fory/lib/meta/MetaString.ts
@@ -201,7 +201,7 @@ export class MetaStringDecoder {
 
   capitalize(str: string) {
     if (typeof str !== "string" || str.length === 0) {
-      return str; // 如果不是字符串或为空,直接返回原值
+      return str; // If not a string or empty, return the original value
     }
     return str.charAt(0).toUpperCase() + str.slice(1);
   }
@@ -366,22 +366,22 @@ export class MetaStringEncoder {
   }
 
   isUpperCase(str: string) {
-    // 检查字符串是否为空
+    // Check whether the string is empty
     if (typeof str !== "string" || str.length === 0) {
-      return false; // 如果不是字符串或为空,返回 false
+      return false; // If not a string or empty, return false
     }
 
-    // 使用正则表达式检查是否所有字母字符都是大写的
+    // Use a regular expression to check whether all alphabetic characters are 
uppercase
     return /^[^a-z]*$/.test(str);
   }
 
   isDigit(str: string) {
-    // 检查字符串是否为空
+    // Check whether the string is empty
     if (typeof str !== "string" || str.length === 0) {
-      return false; // 如果不是字符串或为空,返回 false
+      return false; // If not a string or empty, return false
     }
 
-    // 使用正则表达式检查是否所有字母字符都是大写的
+    // Use a regular expression to check whether all alphabetic characters are 
uppercase
     return /^[^0-9]*$/.test(str);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to