|
Translation uploaded |
|
|
String added in the repository |
|
|
Translation uploaded |
|
|
String added in the repository |
The second, more powerful approach, is to provide the conversion implementation yourself. With Boost.JSON this is done by defining an overload of `tag_invoke` function (the benefits of this mechanism are outlined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++ proposal P1895]. In essence, `tag_invoke` provides a uniform interface for defining customization points by using argument-dependent lookup to find a viable overload from the point at which it is called. As the name suggests, a tag type is passed as an argument in order to:
The second, more powerful approach, is to provide the conversion implementation yourself. With Boost.JSON this is done by defining an overload of `tag_invoke` function (the benefits of this mechanism are outlined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++ proposal P1895]. In essence, `tag_invoke` provides a uniform interface for defining customization points by using argument-dependent lookup to find a viable overload from the point at which it is called. As the name suggests, a tag type is passed as an argument in order to:
|
| Shortcut | Action |
|---|---|
| ? | Open available keyboard shortcuts. |
| Alt + Home | Navigate to the first translation in the current search. |
| Alt + End | Navigate to the last translation in the current search. |
|
Alt + PageUp or
Ctrl + ↑ or Alt + ↑ or Cmd + ↑ or |
Navigate to the previous translation in the current search. |
|
Alt + PageDown or
Ctrl + ↓ or Alt + ↓ or Cmd + ↓ or |
Navigate to the next translation in the current search. |
|
Ctrl + Enter or
Cmd + Enter |
Submit current form; this works the same as pressing Save and continue while editing translation. |
|
Ctrl + Shift + Enter or
Cmd + Shift +Enter |
Unmark translation as Needing edit and submit it. |
|
Alt + Enter or
Option + Enter |
Submit the string as a suggestion; this works the same as pressing Suggest while editing translation. |
|
Ctrl + E or
Cmd + E |
Focus on translation editor. |
|
Ctrl + U or
Cmd + U |
Focus on comment editor. |
|
Ctrl + M or
Cmd + M |
Shows Automatic suggestions tab. |
|
Ctrl + 1 to
Ctrl + 9 or
Cmd + 1 to Cmd + 9 |
Copies placeable of a given number from source string. |
|
Ctrl + M followed by
1 to 9 or
Cmd + M followed by 1 to 9 |
Copy the machine translation of a given number to current translation. |
|
Ctrl + I followed by
1 to
9 or
Cmd + I followed by 1 to 9 |
Ignore one item in the list of failing checks. |
|
Ctrl + J or
Cmd + J |
Shows the Nearby strings tab. |
|
Ctrl + S or
Cmd + S |
Focus on search field. |
|
Ctrl + O or
Cmd + O |
Copy the source string. |
|
Ctrl + Y or
Cmd + Y |
Toggle the Needs editing checkbox. |
| → | Browse the next translation string. |
| ← | Browse the previous translation string. |
The second, more powerful approach, is to provide the conversion implementation yourself. With Boost.JSON this is done by defining an overload of `tag_invoke` function (the benefits of this mechanism are outlined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++ proposal P1895]. In essence, `tag_invoke` provides a uniform interface for defining customization points by using argument-dependent lookup to find a viable overload from the point at which it is called. As the name suggests, a tag type is passed as an argument in order to:第二种、更强大的方法是自行提供转换实现。在 Boost.JSON 中,这是通过定义`tag_invoke`函数的重载来实现的(该机制的优点详见 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++提案P1895])。本质上,`tag_invoke` 通过参数依赖查找(ADL)在调用点寻找可用的重载,从而为自定义扩展点提供统一接口。顾名思义,一个标签类型作为参数传递,用于: