From 962710e9db2c9866c15f01b25da65815e2bf87e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8D=89?= <52877059+xiaocao666tzh@users.noreply.github.com> Date: Fri, 3 Dec 2021 22:35:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改部分文件 --- .gitignore | 1 - .jshintrc | 19 ------------------ LICENSE.txt => LICENSE | 2 +- README.md | 44 +++++++----------------------------------- index.html | 14 +++++++------- js/html_actuator.js | 2 +- style/main.css | 4 ++-- style/main.scss | 4 ++-- 8 files changed, 20 insertions(+), 70 deletions(-) delete mode 100644 .gitignore delete mode 100644 .jshintrc rename LICENSE.txt => LICENSE (96%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0d31019855..0000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.sass-cache/ diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 87dbf9ac3d..0000000000 --- a/.jshintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "esnext": true, - "indent": 2, - "maxlen": 80, - "freeze": true, - "camelcase": true, - "unused": true, - "eqnull": true, - "proto": true, - "supernew": true, - "noyield": true, - "evil": true, - "node": true, - "boss": true, - "expr": true, - "loopfunc": true, - "white": true, - "maxdepth": 4 -} diff --git a/LICENSE.txt b/LICENSE similarity index 96% rename from LICENSE.txt rename to LICENSE index b0dbfa4d75..9607190465 100644 --- a/LICENSE.txt +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Gabriele Cirulli +Copyright (c) 2014 xiaocao666tzh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6b1da38794..44efcb4deb 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,8 @@ -# 2048 -A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone). +# 2048汉化版 +这是2048的汉化版,源代码来自github上面的另一位大佬https://github.com/gabrielecirulli/2048 +可惜的是只有英文,自己也没有找到比较好的中文版的2048,便自己翻译成了中文,现在看应该翻译的差不多了,如果还有没有翻译完成的地方请随时告诉我,继续去完善这个翻译。 +## demo网址 +https://game.377.run +## 赞赏我 +![](https://raw.githubusercontent.com/xiaocao666tzh/imghosting/main/img/%E4%B8%87%E8%83%BD%E6%94%B6%E6%AC%BE%E7%A0%81-%E8%8D%89%E3%81%AE%E5%8D%9A%E5%AE%A2.png) -Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/) - -The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805) - -### Contributions - -[Anna Harren](https://github.com/iirelu/) and [sigod](https://github.com/sigod) are maintainers for this repository. - -Other notable contributors: - - - [TimPetricola](https://github.com/TimPetricola) added best score storage - - [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile - - [marcingajda](https://github.com/marcingajda) made swipes work on Windows Phone - - [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3 - -Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions. - -### Screenshot - -
- -
- -That screenshot is fake, by the way. I never reached 2048 :smile: - -## Contributing -Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process. - -You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md) - -## License -2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt) - -## Donations -I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much! diff --git a/index.html b/index.html index 0da0ee0e1b..cada390e38 100644 --- a/index.html +++ b/index.html @@ -27,16 +27,16 @@- How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one! + 怎么玩: 用你的 上下左右键 去移动数字. 当两个相同的数字碰到一起时, 它们 就会合二为一
- Note: This site is the official version of 2048. You can play it on your phone via http://git.io/2048. All other apps or sites are derivatives or fakes, and should be used with caution. + PS: 本站为2048正式版。源代码来自 github
- Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer. + 由 Gabriele Cirulli. 创作,基于 Veewo Studio的1024 与Threes by Asher Vollmer概念相似,由小草汉化
diff --git a/js/html_actuator.js b/js/html_actuator.js index 6b31f2d107..68cf4c4291 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -126,7 +126,7 @@ HTMLActuator.prototype.updateBestScore = function (bestScore) { HTMLActuator.prototype.message = function (won) { var type = won ? "game-won" : "game-over"; - var message = won ? "You win!" : "Game over!"; + var message = won ? "恭喜你赢了!" : "游戏失败!"; this.messageContainer.classList.add(type); this.messageContainer.getElementsByTagName("p")[0].textContent = message; diff --git a/style/main.css b/style/main.css index ea3cb19fca..c65d0a7002 100644 --- a/style/main.css +++ b/style/main.css @@ -90,10 +90,10 @@ h1.title { animation-fill-mode: both; } .score-container:after { - content: "Score"; } + content: "分数"; } .best-container:after { - content: "Best"; } + content: "最高分"; } p { margin-top: 0; diff --git a/style/main.scss b/style/main.scss index b0ec8da9cc..e5cadb1a50 100644 --- a/style/main.scss +++ b/style/main.scss @@ -107,11 +107,11 @@ h1.title { } .score-container:after { - content: "Score"; + content: "分数"; } .best-container:after { - content: "Best"; + content: "最高分"; } p { From 2241d86968c1afd90f5efa269c895c9f432fa6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8D=89?= <52877059+xiaocao666tzh@users.noreply.github.com> Date: Thu, 24 Feb 2022 21:24:42 +0800 Subject: [PATCH 2/2] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 9607190465..b0dbfa4d75 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 xiaocao666tzh +Copyright (c) 2014 Gabriele Cirulli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal