“启用/禁用”这个词是什么?
当我想评论有关控件启用/禁用的代码时,以及当我想与人们讨论控件启用/禁用时,我真的希望实际上有一个词,而不是键入或说“启用/禁用”。
目前我使用EnDisable这个词,它的真正含义是什么?
When I want to comment code about control Enable/Disable and when I want to discuss with people about the control Enable/Disable, I really hope there is actually a word to it instead of typing or saying "Enable/Disable".
Currently I use the word EnDisable, what is the real word of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我建议使用“切换”,尽管它并不完全意味着启用/禁用,但它通常在用户界面的上下文中使用(如 @Pekka 提到的)。
I would suggest using "toggle" as although it doesn't exactly mean Enable/Disable it is commonly used as such in the context of user interfaces (as @Pekka mentioned).
我用“能力”,因为如果某件事是“启用”的,那么它是“能够”的,如果它是“禁用”的,那么它是“无法”的,所以“能力”对我来说很有效,而且很容易理解。
为了切换参数,我将函数命名为“setAbility”。
I use "Ability", because if something is "enabled", it is "able to", and if it's "disabled" it is "unable to", so "ability" works for me and it's quite understandable.
To switch the parameter I name my function "setAbility".
确实取决于上下文。
更新:@Yacoby 拥有完美的一个,它广泛用于用户界面上下文中。
Really depends on the context.
Update: @Yacoby has the perfect one, it's widely used in user interface contexts.
如果我正在编写根据其他数据启用或禁用某些功能的函数,我通常将它们称为“ToggleXXX”。
If I'm writing functions that enable or disable something depending some other data, I usually call them "ToggleXXX".
取决于上下文。如果你指的是生命支持系统,可能是“杀戮”。
Depends on the context. If you are referring to a life-support system, 'Kill' probably.
根据上下文,但如果谈论默认情况下启用或禁用某些内容,我会建议行为。
其他词如动作、切换或条件也可以根据上下文起作用
Depending on the context, but I would suggest Behavior if talking about whether something is enabled or disabled by default.
Other words like action, toggle, or condition can also work depending on the context
有条件
是另一种选择。Conditional
is another option.