Skip to content

Commit d597dbe

Browse files
authored
Merge pull request #26 from kazuki43zoo/support-translations
Support translations mechanism
2 parents aa327c6 + fa94ef4 commit d597dbe

File tree

15 files changed

+193
-0
lines changed

15 files changed

+193
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ The project that the MyBatis integration with Spring Native feature.
2929
* [Quick Start](https://github.com/mybatis/spring-native/wiki/Quick-Start)
3030
* [Reference documentation](docs/src/site/markdown/index.md)
3131

32+
### Translations
33+
34+
* [Reference documentation (简体中文)](docs/src/site/zh/markdown/index.md)
35+
3236
## How to install on your application
3337

3438
Specify the `mybatis-spring-native-core` on `pom.xml` as follows:

docs/src/site/markdown/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,12 @@ Provides examples for running the MyBatis in spring-native.
164164
| `mybatis-spring-native-sample-cache` | The sample application with built-in 2nd cache feature |
165165
| `mybatis-spring-native-sample-configuration` | The sample application with customizing MyBatis's configuration using configuration properties feature(`application.properties`) |
166166
| `mybatis-spring-native-sample-dynamic-sql` | The sample application using `mybatis-dynamic-sql` |
167+
168+
# Translations
169+
170+
Users can read about MyBatis-Spring-Native in the following translations:
171+
172+
<ul class="i18n">
173+
<li class="en"><a href="./index.html">English</a></li>
174+
<li class="zh"><a href="./zh/index.html">简体中文</a></li>
175+
</ul>

docs/src/site/resources/css/site.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/*
17+
* when new flags are needed, take them from
18+
*
19+
* http://www.printableworldflags.com/flag-icon
20+
*
21+
* that are free for any kind of usage
22+
*/
23+
24+
ul.i18n {list-style-type:none;}
25+
li.en {background: url('../images/en.png') left no-repeat;padding-left: 32px; margin: 10px}
26+
li.es {background: url('../images/es.png') left no-repeat;padding-left: 32px; margin: 10px}
27+
li.ja {background: url('../images/ja.png') left no-repeat;padding-left: 32px; margin: 10px}
28+
li.zh {background: url('../images/zh.png') left no-repeat;padding-left: 32px; margin: 10px}
29+
li.ko {background: url('../images/ko.png') left no-repeat;padding-left: 32px; margin: 10px}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/*
17+
* when new flags are needed, take them from
18+
*
19+
* http://www.printableworldflags.com/flag-icon
20+
*
21+
* that are free for any kind of usage
22+
*/
23+
24+
ul.i18n {list-style-type:none;}
25+
li.en {background: url('../../images/en.png') left no-repeat;padding-left: 32px; margin: 10px}
26+
li.es {background: url('../../images/es.png') left no-repeat;padding-left: 32px; margin: 10px}
27+
li.ja {background: url('../../images/ja.png') left no-repeat;padding-left: 32px; margin: 10px}
28+
li.zh {background: url('../../images/zh.png') left no-repeat;padding-left: 32px; margin: 10px}
29+
li.ko {background: url('../../images/ko.png') left no-repeat;padding-left: 32px; margin: 10px}

docs/src/site/resources/images/en.png

1.73 KB
Loading

docs/src/site/resources/images/es.png

873 Bytes
Loading

docs/src/site/resources/images/ja.png

705 Bytes
Loading

docs/src/site/resources/images/ko.png

1.33 KB
Loading

docs/src/site/resources/images/zh.png

793 Bytes
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/*
17+
* when new flags are needed, take them from
18+
*
19+
* http://www.printableworldflags.com/flag-icon
20+
*
21+
* that are free for any kind of usage
22+
*/
23+
24+
ul.i18n {list-style-type:none;}
25+
li.en {background: url('../../images/en.png') left no-repeat;padding-left: 32px; margin: 10px}
26+
li.es {background: url('../../images/es.png') left no-repeat;padding-left: 32px; margin: 10px}
27+
li.ja {background: url('../../images/ja.png') left no-repeat;padding-left: 32px; margin: 10px}
28+
li.zh {background: url('../../images/zh.png') left no-repeat;padding-left: 32px; margin: 10px}
29+
li.ko {background: url('../../images/ko.png') left no-repeat;padding-left: 32px; margin: 10px}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/*
17+
* when new flags are needed, take them from
18+
*
19+
* http://www.printableworldflags.com/flag-icon
20+
*
21+
* that are free for any kind of usage
22+
*/
23+
24+
ul.i18n {list-style-type:none;}
25+
li.en {background: url('../../images/en.png') left no-repeat;padding-left: 32px; margin: 10px}
26+
li.es {background: url('../../images/es.png') left no-repeat;padding-left: 32px; margin: 10px}
27+
li.ja {background: url('../../images/ja.png') left no-repeat;padding-left: 32px; margin: 10px}
28+
li.zh {background: url('../../images/zh.png') left no-repeat;padding-left: 32px; margin: 10px}
29+
li.ko {background: url('../../images/ko.png') left no-repeat;padding-left: 32px; margin: 10px}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/*
17+
* when new flags are needed, take them from
18+
*
19+
* http://www.printableworldflags.com/flag-icon
20+
*
21+
* that are free for any kind of usage
22+
*/
23+
24+
ul.i18n {list-style-type:none;}
25+
li.en {background: url('../../images/en.png') left no-repeat;padding-left: 32px; margin: 10px}
26+
li.es {background: url('../../images/es.png') left no-repeat;padding-left: 32px; margin: 10px}
27+
li.ja {background: url('../../images/ja.png') left no-repeat;padding-left: 32px; margin: 10px}
28+
li.zh {background: url('../../images/zh.png') left no-repeat;padding-left: 32px; margin: 10px}
29+
li.ko {background: url('../../images/ko.png') left no-repeat;padding-left: 32px; margin: 10px}

docs/src/site/site_zh.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2022 the original author or authors.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
19+
<project name="${project.name}" xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd">
21+
<body>
22+
<menu name="参考文件">
23+
</menu>
24+
</body>
25+
</project>

docs/src/site/markdown/zh/index.md renamed to docs/src/site/zh/markdown/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,12 @@ public class MybatisSpringNativeSampleApplication {
166166
| `mybatis-spring-native-sample-cache` | 使用二级缓存的样例程序 |
167167
| `mybatis-spring-native-sample-configuration` | 使用配置属性功能定制MyBatis的配置的样例程序(`application.properties` ) |
168168
| `mybatis-spring-native-sample-dynamic-sql` | 使用 `mybatis-dynamic-sql` 的样例程序 |
169+
170+
# 文档的翻译版本
171+
172+
可以阅读以下 MyBatis-Spring-Native 文档的翻译版本:
173+
174+
<ul class="i18n">
175+
<li class="en"><a href="./../index.html">English</a></li>
176+
<li class="zh"><a href="./../zh/index.html">简体中文</a></li>
177+
</ul>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
<groupId>org.apache.maven.plugins</groupId>
112112
<artifactId>maven-site-plugin</artifactId>
113113
<configuration>
114+
<locales>en,zh_CN</locales>
114115
<!-- Build using files that replace a placeholder using project properties -->
115116
<siteDirectory>${project.build.directory}/site-src</siteDirectory>
116117
</configuration>

0 commit comments

Comments
 (0)