Skip to content

Commit

Permalink
更新常用库 | Upgrade Libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Caldis committed Feb 15, 2018
1 parent a838fa7 commit 4850058
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 65 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Libs/Charts/Source/Charts/Charts/ChartViewBase.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Charts/PieChartView.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Renderers/LegendRenderer.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Renderers/PieChartRenderer.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Utils/ChartUtils.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Charts/Utils/ViewPortHandler.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Source/Supporting Files/Charts.h
100644 → 100755
Empty file.
Empty file modified Libs/Charts/Tests/Charts/LineChartTests.swift
100644 → 100755
Empty file.
Empty file modified Libs/Charts/scripts/build-dependencies.sh
100644 → 100755
Empty file.
Empty file modified Libs/Charts/scripts/copy-carthage-frameworks.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>EnabledFullIndexStoreVisibility</key>
<false/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Mos.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
</dict>
</plist>
130 changes: 65 additions & 65 deletions docs/index.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
// 浏览器语系
var userAgentLanguage = window.navigator.language.toLowerCase()
// 页面语系
var pageLanguage = document.querySelector("html").lang
// 国际化对照表
var i18nLanguageMappingList = {
title: {
zh: "MOS | 一个用于在 Mac 上平滑你的鼠标滚动效果的小工具, 让你的鼠标滚轮丝滑如触控板",
en: "MOS | A simple tool can offer the smooth scrolling and reverse the mouse scrolling direction on your Mac"
},
intro: {
zh: "疯狂推荐",
en: "Introducing"
},
disc: {
zh: "一个用于在 Mac 上平滑你的鼠标滚动效果的小工具, 让你的鼠标滚轮丝爽如触控板。",
en: "A simple tool can offer the smooth scrolling and reverse the mouse scrolling direction on your Mac"
},
download: {
zh: "立马下载",
en: "Download Now"
},
version: {
zh: "版本 1.7.0, 支持 MacOS 10.11+ 系统。",
en: "Version 1.7.0, Require macOS MacOS 10.11+. "
},
notes: {
zh: "查看更新日志",
en: "Release Notes"
},
star: {
zh: "或者你可以来我们的 Github 赏个Star !",
en: "Or Star the source code from Github !"
},
contact: {
zh: "联系作者",
en: "contact"
},
issue: {
zh: "帮助支持",
en: "Wiki"
}
}
// 国际化页面文字
function translate(language) {
// 目标语系 (手动指定, 默认由浏览器提供)
var targetLanguage = language || userAgentLanguage
// 如果目标语系与当前页面提供语系不同, 则开始翻译
if (targetLanguage !== pageLanguage) {
// 遍历国际化对照表
Object.keys(i18nLanguageMappingList).forEach(function (translationKeyword) {
// 获取每个关键字的国际化映射表
var multiLanguages = i18nLanguageMappingList[translationKeyword]
// 匹配语言, 如果找到对应映射, 则替换标签内原字符
if (multiLanguages[targetLanguage]) {
// 精确匹配 (完全相同)
document.querySelector("#"+translationKeyword).innerText = multiLanguages[targetLanguage]
} else if (multiLanguages[targetLanguage.substring(0, 2)]) {
// 模糊匹配 (仅匹配目标语系的前两个字符, 也就是国家代码)
document.querySelector("#"+translationKeyword).innerText = multiLanguages[targetLanguage.substring(0, 2)]
}
})
}
}
// 开始翻译页面
// 浏览器语系
var userAgentLanguage = window.navigator.language.toLowerCase()
// 页面语系
var pageLanguage = document.querySelector("html").lang
// 国际化对照表
var i18nLanguageMappingList = {
title: {
zh: "MOS | 一个用于在 Mac 上平滑你的鼠标滚动效果的小工具, 让你的鼠标滚轮丝滑如触控板",
en: "MOS | A simple tool can offer the smooth scrolling and reverse the mouse scrolling direction on your Mac"
},
intro: {
zh: "疯狂推荐",
en: "Introducing"
},
disc: {
zh: "一个用于在 Mac 上平滑你的鼠标滚动效果的小工具, 让你的鼠标滚轮丝爽如触控板。",
en: "A simple tool can offer the smooth scrolling and reverse the mouse scrolling direction on your Mac"
},
download: {
zh: "立马下载",
en: "Download Now"
},
version: {
zh: "版本 1.7.0, 支持 MacOS 10.11+ 系统。",
en: "Version 1.7.0, Require macOS MacOS 10.11+. "
},
notes: {
zh: "查看更新日志",
en: "Release Notes"
},
star: {
zh: "或者你可以来我们的 Github 赏个Star !",
en: "Or Star the source code from Github !"
},
contact: {
zh: "联系作者",
en: "contact"
},
issue: {
zh: "帮助支持",
en: "Wiki"
}
}
// 国际化页面文字
function translate(language) {
// 目标语系 (手动指定, 默认由浏览器提供)
var targetLanguage = language || userAgentLanguage
// 如果目标语系与当前页面提供语系不同, 则开始翻译
if (targetLanguage !== pageLanguage) {
// 遍历国际化对照表
Object.keys(i18nLanguageMappingList).forEach(function (translationKeyword) {
// 获取每个关键字的国际化映射表
var multiLanguages = i18nLanguageMappingList[translationKeyword]
// 匹配语言, 如果找到对应映射, 则替换标签内原字符
if (multiLanguages[targetLanguage]) {
// 精确匹配 (完全相同)
document.querySelector("#"+translationKeyword).innerText = multiLanguages[targetLanguage]
} else if (multiLanguages[targetLanguage.substring(0, 2)]) {
// 模糊匹配 (仅匹配目标语系的前两个字符, 也就是国家代码)
document.querySelector("#"+translationKeyword).innerText = multiLanguages[targetLanguage.substring(0, 2)]
}
})
}
}
// 开始翻译页面
translate()

0 comments on commit 4850058

Please sign in to comment.