[GH-ISSUE #62] Translation not working #47

Closed
opened 2026-10-30 21:17:50 +00:00 by bsakaguchi · 7 comments
Owner

Originally created by @byzod on GitHub (Nov 4, 2022).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/62

  1. Download github.com/DominikDoom/a1111-sd-webui-tagcomplete@82355cdb60 as zip, extract to sd webui's extension folder \extensions\tag-complete\
  2. Create test.csv with content below and save with UTF-8 encoding, place it into \extensions\tag-complete\tags\
    solo,0,单人
    
  3. Change line 24 of \extensions\tag-complete\tags\config.json from "extraFile": "", to "extraFile": "test.csv",
  4. Launch sd webui and wait for tagcomplete loaded, then type sol in prompt textbox

Expected result:

0

Actual result:

1

Originally created by @byzod on GitHub (Nov 4, 2022). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/62 1. Download https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/82355cdb608c4acc5a42ace2079916ddd9b63576 as zip, extract to sd webui's extension folder `\extensions\tag-complete\` 2. Create `test.csv` with content below and save with UTF-8 encoding, place it into `\extensions\tag-complete\tags\` ``` solo,0,单人 ``` 4. Change line 24 of `\extensions\tag-complete\tags\config.json` from `"extraFile": "",` to `"extraFile": "test.csv",` 5. Launch sd webui and wait for tagcomplete loaded, then type `sol` in prompt textbox ### Expected result: ![0](https://user-images.githubusercontent.com/34448969/196176233-76d4cb5f-16cf-4800-a69b-adb64a79ca8b.png) ### Actual result: ![1](https://user-images.githubusercontent.com/848607/200031061-02dda4c6-5c76-4cbd-9667-2247ed26c8c1.jpg)
Author
Owner

@DominikDoom commented on GitHub (Nov 4, 2022):

The translations will only show if you search by the translated term, just with the rest of the aliases.
So in case of this example, it will show when typing a part of 单人.

I can't really have an "always show" option since a tag often has multiple aliases, so there's no way to choose which one to display in that case (except maybe defaulting to the first/last). And I also don't want to add a completely separate field for translation in the csv since aliases and translations are functionally the same.

Is this a big issue? I was under the impression that you would only use the translations by typing the translated term in the first place.

<!-- gh-comment-id:1303896280 --> @DominikDoom commented on GitHub (Nov 4, 2022): The translations will only show if you search by the translated term, just with the rest of the aliases. So in case of this example, it will show when typing a part of 单人. I can't really have an "always show" option since a tag often has multiple aliases, so there's no way to choose which one to display in that case (except maybe defaulting to the first/last). And I also don't want to add a completely separate field for translation in the csv since aliases and translations are functionally the same. Is this a big issue? I was under the impression that you would only use the translations by typing the translated term in the first place.
Author
Owner

@byzod commented on GitHub (Nov 5, 2022):

The translations will only show if you search by the translated term, just with the rest of the aliases. So in case of this example, it will show when typing a part of 单人.

I can't really have an "always show" option since a tag often has multiple aliases, so there's no way to choose which one to display in that case (except maybe defaulting to the first/last). And I also don't want to add a completely separate field for translation in the csv since aliases and translations are functionally the same.

Is this a big issue? I was under the impression that you would only use the translations by typing the translated term in the first place.

Yes, it's a game changer. Searching english words while displaying translation is the main feature required for non-english speakers, just like the main input box for English-Chinese translation requires you type english words, not the contrary. Or like physical english dictionaries, there're no dictionaries indexed by Chinese words

Search Chinese to find english result is an excellent additional feature but not essential. Just like chinese-english translation, they have different purpose and can't replace each other's role

I suppose that different implementation of alias and translation is required, they're not exact the same thing

Translation with alias could possible looks like this:
3

or this:
2
(by using ruby text)

<!-- gh-comment-id:1304398802 --> @byzod commented on GitHub (Nov 5, 2022): > The translations will only show if you search by the translated term, just with the rest of the aliases. So in case of this example, it will show when typing a part of 单人. > > I can't really have an "always show" option since a tag often has multiple aliases, so there's no way to choose which one to display in that case (except maybe defaulting to the first/last). And I also don't want to add a completely separate field for translation in the csv since aliases and translations are functionally the same. > > Is this a big issue? I was under the impression that you would only use the translations by typing the translated term in the first place. Yes, it's a game changer. Searching english words while displaying translation is the main feature required for non-english speakers, just like the main input box for English-Chinese translation requires you type english words, not the contrary. Or like physical english dictionaries, there're no dictionaries indexed by Chinese words Search Chinese to find english result is an excellent additional feature but not essential. Just like chinese-english translation, they have different purpose and can't replace each other's role I suppose that different implementation of alias and translation is required, they're not exact the same thing Translation with alias could possible looks like this: ![3](https://user-images.githubusercontent.com/848607/200100359-a60ab11b-df2a-4d4a-bac9-08f66a1b1d54.jpg) or this: ![2](https://user-images.githubusercontent.com/848607/200100288-99517eb5-9c8b-4ced-8b5e-9e6dd79313d5.jpg) (by using [ruby text](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby))
Author
Owner

@DominikDoom commented on GitHub (Nov 5, 2022):

I changed it to work like in your first suggestion for now. Translations need to be added in a new separate CSV file, not as an extra file anymore. Default is just two columns with English as first and Translation as second, but I also included a config switch for the old extra format with 3 columns if you use one of those files.
The translations are currently always visible, and are matched purely based on the tag/alias name. Searching by the translated text still works like before if you leave it true in the config.

<!-- gh-comment-id:1304562544 --> @DominikDoom commented on GitHub (Nov 5, 2022): I changed it to work like in your first suggestion for now. Translations need to be added in a new separate CSV file, not as an extra file anymore. Default is just two columns with English as first and Translation as second, but I also included a config switch for the old extra format with 3 columns if you use one of those files. The translations are currently always visible, and are matched purely based on the tag/alias name. Searching by the translated text still works like before if you leave it true in the config.
Author
Owner

@byzod commented on GitHub (Nov 5, 2022):

I changed it to work like in your first suggestion for now. Translations need to be added in a new separate CSV file, not as an extra file anymore. Default is just two columns with English as first and Translation as second, but I also included a config switch for the old extra format with 3 columns if you use one of those files. The translations are currently always visible, and are matched purely based on the tag/alias name. Searching by the translated text still works like before if you leave it true in the config.

Thanks! This is really important for who using it as translate tag helper

<!-- gh-comment-id:1304664878 --> @byzod commented on GitHub (Nov 5, 2022): > I changed it to work like in your first suggestion for now. Translations need to be added in a new separate CSV file, not as an extra file anymore. Default is just two columns with English as first and Translation as second, but I also included a config switch for the old extra format with 3 columns if you use one of those files. The translations are currently always visible, and are matched purely based on the tag/alias name. Searching by the translated text still works like before if you leave it true in the config. Thanks! This is really important for who using it as translate tag helper
Author
Owner

@byzod commented on GitHub (Nov 6, 2022):

@DominikDoom

  1. I found that search results by translated text is much lesser than before with the same translation csv, for example searching 袜, every sorts of socks/stocking/thighhighs are displayed, in fact there are 121 hits of 袜 in translation csv
    But after 1.11 I got only 16 results no matter what, even I change resultStepLength to an absurd high value

    demo of searching results of 袜 with github.com/DominikDoom/a1111-sd-webui-tagcomplete@abb5625e55
    1

    screenshot of searching results of 袜 with github.com/DominikDoom/a1111-sd-webui-tagcomplete@4eabf00f01, step length 95500
    2

  2. Strangely, in github.com/DominikDoom/a1111-sd-webui-tagcomplete@4eabf00f01, 美式短袜 (bobby_socks) is in results when searching 短袜 but is not when searching 袜. Few test results: (test done with step length 500 cuz 95500 is too laggy...)

    searching terms bobby_socks[美式短袜] included in results
    美 Yes
    式 No
    短 No
    袜 No
    美式 Yes
    式短 Yes
    短袜 Yes
    美式短 Yes
    式短袜 Yes
    美式短袜 Yes

Translation and config I use, if it helps (filename with -legacy is for pre-1.10)
cn tags test.zip

p.s. not sure if this is the same problem, should I open a new issue?

<!-- gh-comment-id:1304709484 --> @byzod commented on GitHub (Nov 6, 2022): @DominikDoom 1. I found that search results by translated text is much lesser than before with the same translation csv, for example searching `袜`, every sorts of socks/stocking/thighhighs are displayed, in fact there are 121 hits of `袜` in translation csv But after 1.11 I got only 16 results no matter what, even I change `resultStepLength` to an absurd high value demo of searching results of `袜` with https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/abb5625e55ff07187a8218236cd50691e5c98bb2 ![1](https://user-images.githubusercontent.com/848607/200153030-1e0b7122-9b8a-4aa6-b9e5-82bf6fa95026.gif) screenshot of searching results of `袜` with https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/4eabf00f015b2ddedba98176752dd853678a6f57, step length 95500 ![2](https://user-images.githubusercontent.com/848607/200153035-42568f15-a0a3-4fa9-b0e5-a47fd3c49eb1.jpg) 2. Strangely, in https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/4eabf00f015b2ddedba98176752dd853678a6f57, `美式短袜` (bobby_socks) is in results when searching `短袜` but is not when searching `袜`. Few test results: (test done with step length 500 cuz 95500 is too laggy...) searching terms | `bobby_socks[美式短袜]` included in results -|- 美 | Yes 式 | **No** 短 | **No** 袜 | **No** 美式 | Yes 式短 | Yes 短袜 | Yes 美式短 | Yes 式短袜 | Yes 美式短袜 | Yes Translation and config I use, if it helps (filename with `-legacy` is for pre-1.10) [cn tags test.zip](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/files/9945123/cn.tags.test.zip) p.s. not sure if this is the same problem, should I open a new issue?
Author
Owner

@DominikDoom commented on GitHub (Nov 6, 2022):

You're right, I tried it with your translation file and it seems to be a bug related to if the searched translation is in the alias, but not the tag itself. The example with bobby_socks is caused because the results with e.g. 式 include tags where this is the case, so the list is cut off on the first tag that fails to match (in this example "ascot").

<!-- gh-comment-id:1304795829 --> @DominikDoom commented on GitHub (Nov 6, 2022): You're right, I tried it with your translation file and it seems to be a bug related to if the searched translation is in the alias, but not the tag itself. The example with bobby_socks is caused because the results with e.g. 式 include tags where this is the case, so the list is cut off on the first tag that fails to match (in this example "ascot").
Author
Owner

@DominikDoom commented on GitHub (Nov 6, 2022):

I think I was already able to fix it, at least I don't see any more cutoff on my side with your test tags.
But feel free to reopen this if you find something that still behaves strange with translations.

<!-- gh-comment-id:1304796753 --> @DominikDoom commented on GitHub (Nov 6, 2022): I think I was already able to fix it, at least I don't see any more cutoff on my side with your test tags. But feel free to reopen this if you find something that still behaves strange with translations.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#47
No description provided.