Skip to content

Commit

Permalink
Merge pull request #275 from w568w/master
Browse files Browse the repository at this point in the history
Add Chinese (Simplified, or zh_CN) translation and update README_zh_CN.md
  • Loading branch information
l0drex authored Mar 22, 2024
2 parents 9084640 + 875a5ea commit dcbea77
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 41 deletions.
119 changes: 78 additions & 41 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,99 @@
<p align="center">
<img alt="Yin-Yang" title="Yin & Yang" src="resources/logo.svg" height="120">
# ![阴阳的图标](resources/logo.svg) 阴阳

![](https://img.shields.io/github/v/release/oskarsh/yin-yang)
![](https://img.shields.io/github/v/release/oskarsh/yin-yang?include_prereleases)
![](https://img.shields.io/github/downloads/oskarsh/yin-yang/total)
![](https://img.shields.io/badge/Build%20with-Python-yellow)
![](https://img.shields.io/github/license/oskarsh/yin-yang)

<h1 align="center"> 阴阳 </h1> <br>
<p align="center">
适用于Linux的深色主题自动切换工具,支持诸如KDE、Gnome与Budgie等桌面环境以及VSCode、Atom等代码编辑器。
</p>
适用于 Linux 的深色主题自动切换工具,支持诸如 KDE、Gnome 与 Budgie 等桌面环境以及 VSCode、Atom 等代码编辑器。

<p align="center" >
<img alt="" title="YinYang" src="https://img.shields.io/badge/Plasma-5.21-blue">
<img alt="" title="YinYang" src="https://img.shields.io/badge/Yin&Yang-2.0-blue">
<img alt="" title="YinYang" src="https://img.shields.io/badge/License-MIT-blue">
<img alt="" title="YinYang" src="https://badges.frapsoft.com/os/v1/open-source.svg?v=103">
<img alt="" title="YinYang" src="https://img.shields.io/badge/Build%20with-Python-yellow">

你可能也想看看我们的 [**讨论区**](https://github.com/oskarsh/Yin-Yang/discussions),在那里我们讨论应用的未来以及其他有趣的事情!

<p align="center">
<img alt="Yin-Yang" title="Yin & Yang" src=".github/images/header.png">
> 翻译:[🇹🇼](README_zh_TW.md) [🇨🇳](README_zh_CN.md)
![应用效果预览](.github/images/header.png)
![应用设置界面](.github/images/settings.png)

## 特性

* 可以根据时间更换深色(或浅色)主题
* 支持根据日出日落时间自动切换主题
* 支持在切换主题的同时切换桌面壁纸
* 支持KDE、Gnome、Budgie等桌面环境
* 支持VSCode和Atom编辑器

* 支持桌面环境:
* Gnome
* Budgie
* KDE Plasma
* 支持应用程序:
* VSCode、Atom、gedit
* Firefox、Brave
* Kvantum
* Konsole
* OnlyOffice
* 以及更多……
* 其他功能:
* 更换壁纸
* 更换主题时发送通知
* 播放提示音
* 可以运行自定义脚本

> 想要了解更多计划中的功能以及开发状态,请访问[项目状态页面](https://github.com/oskarsh/Yin-Yang/projects?type=classic)
## 安装
在终端输入以下命令:

```git clone https://github.com/oskarsh/Yin-Yang && cd Yin-Yang && ./scripts/install.sh```

然后根据提示进行操作。

在安装本程序前,你需要为程序安装依赖。请参考[本项目Wiki](https://github.com/oskarsh/Yin-Yang/wiki)

[![Generic badge](https://img.shields.io/badge/see-Wiki-BLUE.svg)](<https://github.com/oskarsh/Yin-Yang/wiki>)

<p align="center" >
<img alt="Yin-Yang" title="Yin & Yang" src=".github/images/settings.png" height="400">
### 基于 Arch 的发行版
Yin-Yang 可以从 AUR 下载,包名为 [yin-yang](https://aur.archlinux.org/packages/yin-yang)

### 从源码安装
Yin-Yang 依赖于 pypi 上的 `python-systemd``pyside6``python-systemd` 需要你已经安装了 systemd-headers。你还需要安装 Python 开发头文件(例如 `python3-devel`)。

对于 CentOS、RHEL 和 Fedora:
```bash
sudo dnf install gcc systemd-devel python3-devel libnotify
```

对于 OpenSUSE:
```bash
sudo zypper refresh
sudo zypper install gcc systemd-devel libnotify
```

对于 Debian、Ubuntu 等:
```bash
sudo apt update
sudo apt install libsystemd-dev gcc pkg-config python3-dev libnotify-bin
```

然后你可以在 Python 虚拟环境中安装 Yin-Yang:
```bash
# bash 是必需的,用于运行 source 命令
bash
# 克隆代码到你的本地机器
git clone https://github.com/oskarsh/Yin-Yang.git
cd Yin-Yang
# 安装 Yin-Yang
./scripts/install.sh
```

对于开发,跳过安装步骤,而是在你的家目录中创建一个虚拟环境:
```bash
python -m venv .venv
source .venv/bin/activate # 这是 bash 的命令,其他 shell 中也有类似的脚本,例如 fish
pip install -r requirements.txt
```

## 文档

想要了解更多?[Wiki](https://github.com/oskarsh/Yin-Yang/wiki)会告诉你一切。
想要帮助?查看 Wiki 以了解如何贡献翻译、插件等!

[![Generic badge](https://img.shields.io/badge/Visit-Wiki-BLUE.svg)](<https://github.com/oskarsh/Yin-Yang/wiki>)

## 相关或类似的项目


## 壁纸

阴阳自带了一些定制的壁纸以供你选择。

这些壁纸是开源的,你可以随意使用。本项目也支持任何用户贡献开源壁纸。 参考[贡献](https://github.com/oskarsh/Yin-Yang/wiki/Supporting-Yin-Yang#create-yin-yang-wallpapers).

[![Generic badge](https://img.shields.io/badge/Get-Wallpapers-BLUE.svg)](https://github.com/oskarsh/Yin-Yang-Wallpapers)
- Windows 的自动深色模式:https://github.com/AutoDarkMode/Windows-Auto-Night-Mode
- Gnome 的自动深色模式扩展:https://extensions.gnome.org/extension/2236/night-theme-switcher/
- Jetbrains IDE 的自动深色模式:https://github.com/weisJ/auto-dark-mode
- 与 KDE 的夜间颜色同步深色模式:https://github.com/adrium/knightadjuster
- darkman:https://gitlab.com/WhyNotHugo/darkman
- 在 Firefox 中,你可以使用系统主题来同步 Firefox 本身和支持的应用程序的主题。当你使用 [dark reader](https://darkreader.org/) 时,你可以启用系统颜色自动化。

## 感谢所有为本项目做出贡献的人❤

Expand All @@ -66,7 +103,7 @@

[参与社区贡献](https://github.com/oskarsh/Yin-Yang/wiki/Contributing)

<a href="https://github.com/oskarsh/Yin-Yang/graphs/contributors"><img src="https://opencollective.com/Yin-Yang/contributors.svg?width=890&button=false" /></a>
[![](https://opencollective.com/Yin-Yang/contributors.svg?button=false)](https://github.com/oskarsh/Yin-Yang/graphs/contributors)

### 资金支持

Expand Down
Binary file added resources/translations/yin_yang.zh_CN.qm
Binary file not shown.
108 changes: 108 additions & 0 deletions resources/translations/yin_yang.zh_CN.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>main_window</name>
<message>
<location filename="../../designer/main_window.ui" line="50"/>
<source>Settings</source>
<translation type="unfinished">设置</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="56"/>
<source>Automatic theme switching</source>
<translation type="unfinished">自动切换主题</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="76"/>
<source>Custom Schedule</source>
<translation type="unfinished">自定义切换时间</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="101"/>
<source>Light:</source>
<translation type="unfinished">明亮模式:</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="137"/>
<source>Dark:</source>
<translation type="unfinished">暗黑模式:</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="176"/>
<source>Sunset to Sunrise</source>
<translation type="unfinished">日落至日出</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="189"/>
<source>Longitude:</source>
<translation type="unfinished">经度:</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="224"/>
<source>Latitude:</source>
<translation type="unfinished">纬度:</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="262"/>
<source>update location automatically</source>
<translation type="unfinished">自动更新经纬度</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="285"/>
<source>Light</source>
<translation type="unfinished">明亮模式</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="292"/>
<source>Dark</source>
<translation type="unfinished">暗黑模式</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="302"/>
<source>Send a notification</source>
<translation type="unfinished">切换时发送通知</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="311"/>
<source>Time to wait until the system finished booting. Default value is 10 seconds.</source>
<translation type="unfinished">开机后延迟秒数。默认值为 10 秒。</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="314"/>
<source>Delay after boot:</source>
<translation type="unfinished">系统启动后生效延迟:</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="321"/>
<source>s</source>
<translation type="unfinished">秒</translation>
</message>
<message>
<location filename="../../designer/main_window.ui" line="354"/>
<source>Plugins</source>
<translation type="unfinished">插件</translation>
</message>
</context>
<context>
<name>systray</name>
<message>
<location filename="../../yin_yang/__main__.py" line="127"/>
<source>Open Yin Yang</source>
<comment>Context menu action in the systray</comment>
<translation type="unfinished">打开 Yin Yang</translation>
</message>
<message>
<location filename="../../yin_yang/__main__.py" line="130"/>
<source>Toggle theme</source>
<comment>Context menu action in the systray</comment>
<translation type="unfinished">切换主题</translation>
</message>
<message>
<location filename="../../yin_yang/__main__.py" line="133"/>
<source>Quit</source>
<comment>Context menu action in the systray</comment>
<translation type="unfinished">退出</translation>
</message>
</context>
</TS>

0 comments on commit dcbea77

Please sign in to comment.