If I translate [yes|no] into German, we get [Ja|Nein]. However, SilentCommand uses CString::ToBool for the conversion and thus does not accept the German words. So, my only option is to translate [yes|no] into [yes|no], but that's not really a translation.
There are also lots of other places like this. From the top of my head: Module types cannot be translated either.
```
AddCommand("Silent", t_d("[yes|no]"), t_d("blahblah: description"),
[=](const CString& sLine) { SilentCommand(sLine); });
```
If I translate `[yes|no]` into German, we get `[Ja|Nein]`. However, `SilentCommand` uses `CString::ToBool` for the conversion and thus does not accept the German words. So, my only option is to translate `[yes|no]` into `[yes|no]`, but that's not really a translation.
There are also lots of other places like this. From the top of my head: Module types cannot be translated either.
<!-- github-sync-id:328821227 -->
I don't know what t_d does, but wouldn't it make more sense to write "[" + t_s("yes") + "|" + t_s("no") + "]" for reusability?
I don't know what t_d does, but wouldn't it make more sense to write `"[" + t_s("yes") + "|" + t_s("no") + "]"` for reusability?
<!-- github-comment-id:395118390 -->
t_d means "delayed translation" - the string is marked for translation
here, but is translated later during /msg *module help
No, it won't, for the same reason as psychon described:
CString("no").ToBool() != CString("Nein").ToBool()
It can make sense to describe in the description what this word "yes"
means, but I don't know how to better represent this.
t_d means "delayed translation" - the string is marked for translation
here, but is translated later during /msg *module help
No, it won't, for the same reason as psychon described:
CString("no").ToBool() != CString("Nein").ToBool()
It can make sense to describe in the description what this word "yes"
means, but I don't know how to better represent this.
2018-06-06 16:50 GMT+01:00 Jos Ahrens <notifications@github.com>:
> I don't know what t_d does, but wouldn't it make more sense to write "["
> + t_s("yes") + "|" + t_s("no") + "]" for reusability?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/znc/znc/issues/1549#issuecomment-395118390>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAT15Jvmn290u1lKv7eOksJpA6TSm1aHks5t5_o_gaJpZM4UYDAE>
> .
>
<!-- github-comment-id:395131339 -->
There could be a separate function for display vs for all uses not displayed to user, with carefully calling one or the other, or both in every case. The existing ToBool function is already our own.
Also note that in some languages there is no word for "yes", but it depends on context. Roughly speaking, the answer to "Is grass green?" would be not "Yes", but "It is".
There could be a separate function for display vs for all uses not displayed to user, with carefully calling one or the other, or both in every case. The existing ToBool function is already our own.
Also note that in some languages there is no word for "yes", but it depends on context. Roughly speaking, the answer to "Is grass green?" would be not "Yes", but "It is".
<!-- github-comment-id:541524720 -->
i probably should have thought about that before commenting. those languages would probably end up using numbers, or the english, or you could translate "affirm" and "negate" if the language has words for that.
i probably should have thought about that before commenting. those languages would probably end up using numbers, or the english, or you could translate "affirm" and "negate" if the language has words for that.
<!-- github-comment-id:541875045 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If I translate
[yes|no]into German, we get[Ja|Nein]. However,SilentCommandusesCString::ToBoolfor the conversion and thus does not accept the German words. So, my only option is to translate[yes|no]into[yes|no], but that's not really a translation.There are also lots of other places like this. From the top of my head: Module types cannot be translated either.
I don't know what t_d does, but wouldn't it make more sense to write
"[" + t_s("yes") + "|" + t_s("no") + "]"for reusability?t_d means "delayed translation" - the string is marked for translation
here, but is translated later during /msg *module help
No, it won't, for the same reason as psychon described:
CString("no").ToBool() != CString("Nein").ToBool()
It can make sense to describe in the description what this word "yes"
means, but I don't know how to better represent this.
2018-06-06 16:50 GMT+01:00 Jos Ahrens notifications@github.com:
you could implement your own tobool function and have languages declare what their names for 'yes' and 'no' are.
There could be a separate function for display vs for all uses not displayed to user, with carefully calling one or the other, or both in every case. The existing ToBool function is already our own.
Also note that in some languages there is no word for "yes", but it depends on context. Roughly speaking, the answer to "Is grass green?" would be not "Yes", but "It is".
i probably should have thought about that before commenting. those languages would probably end up using numbers, or the english, or you could translate "affirm" and "negate" if the language has words for that.