Coder Social home page Coder Social logo

Comments (4)

pixcai avatar pixcai commented on May 26, 2024

函数名不用翻译

from red-docs.

JiaChen-Zeng avatar JiaChen-Zeng commented on May 26, 2024

嗯我也是那样想,然而回头发现 Draw 里的关键字都被翻译好了。其实提供一个中文翻译也不错,我想像这样的地方以英文为主,然后括号里提供一个中文可能不错。

用例:比如 curvecurv,我们口头上说(说话)的时候,如果我们念英文,比较难准确地指究竟是哪个,硬要用英文区分的话,一种方法是把 curv 叫成 cur V,一种是一个一个字母念,这很傻并且不利于交流。这里通过给它提供一个好区别的中文翻译,可以提高今后我们交流 Red 语言时的准确性和流畅度。

上面说的这个翻译的准确地说是 DSL 中的关键字。关键字和函数有差吗?翻译关键字不翻译函数名比较好吗?能不能函数名也翻译了,那不是更好?Red 就是秉承简单与初学者友好的,提供一个中文翻译很符合 Red 的风格,初学者想查函数直接目测中文。不过如果要翻译起来的话,可能会遇到很难翻译的函数。还有像 libRed 里提供给 C 的函数 redMake() 什么感觉不需要翻译吧。

另外,我现在有对一些选项可以取的枚举值有提供中文翻译,写在括号里的,比如渐变填充的传播模式(spread-method)能取 pad(填充)、repeat(重复)、reflect(反射)。这样给了翻译也省得每个看了文档不懂英文意思的人都去查一遍词典(然后可能还是一脸懵逼),虽然翻译过来也不能直接看懂选项的意思(英文肯定也不行,这可以算是专业名词),但是可以给读者一个大概的感觉。

from red-docs.

pixcai avatar pixcai commented on May 26, 2024

可以

from red-docs.

JiaChen-Zeng avatar JiaChen-Zeng commented on May 26, 2024

/closes by #44

from red-docs.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.