Add files via upload

这个提交包含在:
小小白哦
2026-04-06 20:39:53 +08:00
提交者 GitHub
当前提交 77a8e5d339
修改 9 个文件,包含 1197 行新增0 行删除
+2
查看文件
@@ -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
查看文件
文件差异内容过多而无法显示 加载差异
+21
查看文件
@@ -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.
+52
查看文件
@@ -0,0 +1,52 @@
# Flarum 梗体中文语言包
# Flarum Funny Simplified Chinese Language Pack
[![GitHub license](https://img.shields.io/github/license/flarum-lang/chinese-simplified?color=%230172b2)](https://github.com/flarum-lang/chinese-simplified/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/flarum-lang/chinese-simplified.svg)](https://packagist.org/packages/flarum-lang/chinese-simplified) ![Packagist](https://img.shields.io/packagist/dt/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;
二进制
查看文件
二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 444 KiB