Giter Club home page Giter Club logo

i7h's Introduction

【i18nglish】自动i18n!

大家在工作中有经常遇到i18n这个单词吗?

i18n是internationalization的缩写,i和n是它的首尾字母,18则是中间的字符数量。

嗯……所以是谁发明的这个缩写?烂死了!我要把所有单词都变成i18n的,让他看看我的厉害!

好,就叫做i18nglish好了!

使用效果

使用前:

  Alice was beginning to get very tired of sitting by her sister
on the bank, and of having nothing to do:  once or twice she had
peeped into the book her sister was reading, but it had no
pictures or conversations in it, `and what is the use of a book,'
thought Alice `without pictures or conversation?'

使用后:

  A3e w1s b7g to g1t v2y t3d of s5g by h1r s4r
on t1e b2k, a1d of h4g n5g to do:  o2e or t3e s1e h1d
p4d i2o t1e b2k h1r s4r w1s r5g, b1t it h1d no
p6s or c11s in it, `a1d w2t is t1e u1e of a b2k,'
t5t A3e `w5t p6s or c10n?'

怎么样,是不是看起来更加i18n了?

使用方法

首先你要有一个Python。

把这个仓库clone回去,然后import i7h就可以啦,接口只有一个,是i7h.i18n

def i18n(s: str) -> str:
    ...

输入一个字符串,就可以把它i18n啦!

结束

我本来想说那个一如既往的结束语的,但是我突然又想到了一件事——

i18n本身也是一个以i开头以n结尾的单词,i和n之间只有2个字符,那岂不是说i18n就是i2n!

其实我是天才吧!

i7h's People

Contributors

rimochan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

i7h's Issues

[Feature] 添加反向接口

将i18n单词还原回原始单词。

正不正确不重要,随便找个能对上的还原回去就行了。效果应该很有意思。

文档规范化提示

为遵循hXt规范,请将您的readme.md改为r4e.md
否则这个文件将成为这个项目的耻辱而一直存在。

3字单词是否应当缩写?

这好像涉及到i7n的定义是什么样的了--如果保持consistency的话好像2字和1字分别应该翻译成
to->t0o
A->A-1(?)A

如果换一定义,保留2字1字的单词为原样,那3字保留原样则可以增加一些可读性(雾

对中文进行适配

实例

原文

明天是小明十八岁数生日

转换后

m3g t3n s3 x3o m3g s3 b2 s3 s4g r2

格式如下

首先转换为无声调的拼音

ming tian shi xiao ming shi ba sui sheng ri

再将声调按照书写格式,放置在指定汉语拼音字母后方(如下)

míng tiān shì xiǎo míng shí bā suì shēng rì

mi2ng tia1n shi4 xia3o mi2ng shi2 ba1 sui4 she1ng ri4

最后转换。

当音调也就是数字位于结尾时,按照中间的字母处理。如下:

ma4 -> m2

mao1 -> m3

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.