Add files via upload
这个提交包含在:
@@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
locale/*.md
|
||||
.vscode/
|
||||
archive/
|
||||
wiki/
|
||||
resources
|
||||
node_modules
|
||||
.lock
|
||||
/vendor
|
||||
composer.lock
|
||||
composer.phar
|
||||
+1007
文件差异内容过多而无法显示
加载差异
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Golden
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Flarum 梗体中文语言包
|
||||
# Flarum Funny Simplified Chinese Language Pack
|
||||
[](https://github.com/flarum-lang/chinese-simplified/blob/master/LICENSE) [](https://packagist.org/packages/flarum-lang/chinese-simplified) 
|
||||
|
||||
本语言包基于 [flarum/lang-english](https://github.com/flarum/lang-english)、[jsthon 2015](https://discuss.flarum.org/d/612) 和 [Csineneo 2019](https://github.com/Csineneo/lang-simplified-chinese)。
|
||||
|
||||
Based on [flarum/lang-english](https://github.com/flarum/lang-english), [jsthon 2015](https://discuss.flarum.org/d/612) and [Csineneo Pack 2019](https://github.com/Csineneo/lang-simplified-chinese).
|
||||
|
||||
整体语言风格较充满格调,符合多数中国人思维习惯。
|
||||
|
||||
繁体中文语言包请查阅此处:[繁体中文语言包](https://discuss.flarum.org/d/17954)。
|
||||
|
||||
### 要求 / Require
|
||||
- Flarum v0.1.0-beta.8 及以上版本
|
||||
|
||||
### 安装 / Install
|
||||
**_Flarum 最新版本_**
|
||||
```
|
||||
composer require Xiaoxiaobai5724/netlang
|
||||
php flarum cache:clear
|
||||
```
|
||||
|
||||
_**Flarum 旧版本**_
|
||||
|
||||
- 在末尾写上版本号即可安装指定的语言包版本:`composer require flarum-lang/chinese-simplified:^v1.0.0`,语言包版本号与 Flarum 版本号相同。
|
||||
|
||||
**_Flarum Beta 16 及以下请翻阅语言包历史版本号_**
|
||||
|
||||
### 升级、卸载 / Update & Remove
|
||||
将安装命令中的 require 替换为 update 或 remove
|
||||
|
||||
### [支持的扩展 / Supported Extensions](https://rob006-software.github.io/flarum-translations/status/zh_Hans.html)
|
||||
|
||||
### 报告问题 / Report Issue
|
||||
- [Github](https://github.com/flarum-lang/chinese-simplified/issues)
|
||||
- [在此跟贴](https://discuss.flarum.org.cn/d/1211)
|
||||
|
||||
### 链接 / Links
|
||||
- [Discuss](https://discuss.flarum.org/d/22690)
|
||||
- [Chinese Community](https://discuss.flarum.org.cn/d/1211)
|
||||
- [Github](https://github.com/flarum-lang/chinese-simplified)
|
||||
- [Packagist](https://packagist.org/packages/flarum-lang/chinese-simplified)
|
||||
- [Extiverse](https://extiverse.com/extension/flarum-lang/chinese-simplified)
|
||||
|
||||
### 捐赠 / Donate
|
||||
- [Donate](https://pay.csur.fun)
|
||||
|
||||
### 贡献 / Contribute
|
||||
为尽量保证文案的统一性,请阅读相关规范后再前往[翻译平台](https://weblate.rob006.net/languages/zh_Hans/flarum/?limit=500)参与贡献。
|
||||
- [UI 文案原则](https://www.uisdc.com/ui-copy-design-method#)
|
||||
- [中英文混排规范 W3](https://www.w3.org/TR/clreq/#chinese_and_western_mixed_text_composition)
|
||||
- [混排指北](https://github.com/sparanoid/chinese-copywriting-guidelines/blob/master/README.zh-CN.md)
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "Xiaoxiaobai5724/netlang",
|
||||
"description": "Funny Chinese language pack for Flarum.",
|
||||
"keywords": [
|
||||
"flarum",
|
||||
"locale",
|
||||
"extension",
|
||||
"Chinsese",
|
||||
"中文",
|
||||
"梗体中文"
|
||||
],
|
||||
"type": "flarum-extension",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"flarum/core": "^1.0.0"
|
||||
},
|
||||
"replace": {
|
||||
"littlegolden/flarum-lang-simplified-chinese": "*",
|
||||
"ffans/lang-simplified-chinese": "*"
|
||||
},
|
||||
"extra": {
|
||||
"flarum-extension": {
|
||||
"title": "梗体中文",
|
||||
"category": "language",
|
||||
"icon": {
|
||||
"image": "icon.png",
|
||||
"backgroundColor": "#fff",
|
||||
"backgroundSize": "cover",
|
||||
"backgroundPosition": "center"
|
||||
}
|
||||
},
|
||||
"flarum-locale": {
|
||||
"code": "zh-US",
|
||||
"title": "梗体中文"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
/* 精华 */
|
||||
.Badge--span.Badge.Badge--frontpage {
|
||||
background: #fbbd08;
|
||||
}
|
||||
.Badge--frontpage .fa-home::before {
|
||||
content: "\f091";
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of flarum-lang/chinese-simplified.
|
||||
*
|
||||
* Copyright (c) 2024 Golden.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE.md
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Flarum\Extend;
|
||||
use Flarum\Extend\LanguagePack;
|
||||
use Flarum\Frontend\Document;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
|
||||
$extKey = 'flarum-lang-chinese-simplified';
|
||||
$settings = resolve(SettingsRepositoryInterface::class);
|
||||
$useGoogleFonts = $settings->get($extKey.'.use_google_fonts');
|
||||
|
||||
function is_mobile() {
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$mobile_agents = ['Mobile', 'Android', 'Silk/', 'Kindle', 'BlackBerry', 'Opera Mini', 'Opera Mobi'];
|
||||
|
||||
foreach ($mobile_agents as $agent) {
|
||||
if (stripos($user_agent, $agent) !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$insertFonts = function (Document $document) use ($extKey) {
|
||||
if (!is_mobile()) {
|
||||
$document->head[] = '<link rel="stylesheet" href="/assets/extensions/'. $extKey .'/google-fonts/google-fonts.css">';
|
||||
}
|
||||
};
|
||||
|
||||
$extends = [
|
||||
(new Extend\Frontend('admin'))
|
||||
->js(__DIR__.'/js/dist/admin.js')
|
||||
->css(__DIR__.'/less/admin.less'),
|
||||
|
||||
new LanguagePack,
|
||||
];
|
||||
|
||||
if ($useGoogleFonts) {
|
||||
$extends[] = (new Extend\Frontend('forum'))
|
||||
->content(function (Document $document) use ($insertFonts) {
|
||||
$insertFonts($document);
|
||||
});
|
||||
|
||||
$extends[] = (new Extend\Frontend('admin'))
|
||||
->content(function (Document $document) use ($insertFonts) {
|
||||
$insertFonts($document);
|
||||
});
|
||||
}
|
||||
|
||||
return $extends;
|
||||
在新工单中引用
屏蔽一个用户