osfans / trime

同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
http://osfans.github.io/trime/
GNU General Public License v3.0
3.09k stars 372 forks source link

无法关闭英文模式句首自动大写 #680

Closed dramforever closed 1 year ago

dramforever commented 2 years ago

Describe the bug

style/auto_caps: false 也无法关闭英文模式句首自动大写

To Reproduce

trime.custom.yaml 中配置

patch:  
  "style/auto_caps": false

然后重启 Trime,切换到英文模式开始输入包含 . 的文本

Expected behavior

句首不自动大写

Log

Screenshots

Smartphone (please complete the following information):

tusooa commented 2 years ago

跟这个 https://github.com/osfans/trime/issues/679 https://github.com/osfans/trime/issues/643 我感觉是同一个问题。

Bambooin commented 2 years ago

You can try the latest daily build, seem fix by #711

deluxghost commented 2 years ago

You can try the latest daily build, seem fix by #711

No, this issue is untouched, and there are 2 problems need to be resolved

  1. according to the config, auto_caps should have 3 valid value: true, false and ascii:

    https://github.com/osfans/trime/blob/6c8f0313f5b1523f31c97105d9f58c8c31ce5613/app/src/main/assets/rime/trime.yaml#L9

    but isAutoCaps is defined as a boolean here:

    https://github.com/osfans/trime/blob/6c8f0313f5b1523f31c97105d9f58c8c31ce5613/app/src/main/java/com/osfans/trime/ime/core/Trime.java#L130

  2. look at this condition isAutoCaps || Rime.isAsciiMode(): https://github.com/osfans/trime/blob/6c8f0313f5b1523f31c97105d9f58c8c31ce5613/app/src/main/java/com/osfans/trime/ime/core/Trime.java#L782-L787

    it's obvious, when isAutoCaps == false, it checks isAsciiMode due to the OR logic, but it should not

    the correct condition this line in pseudo code should be:

    // if true/false/ascii are valid
    isAutoCaps == "true" || (isAutoCaps == "ascii" && Rime.isAsciiMode())
    // if only true/false are valid
    isAutoCaps == "true"

I don't have android develop environment set, I hope someone else can post a PR to fix that

tusooa commented 2 years ago

3 4 5个版本之后仍然没修。

dramforever commented 2 years ago

好像我在 FDroid 上更新后没问题了,不过我也没有仔细看配置什么的

tusooa commented 1 year ago

3.2.9上已经不能复现。可能已经修复了。如果修复了,维护者应该关闭这个issue。

dramforever commented 1 year ago

确认新版已经没有这个问题了