-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
352 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
}, | ||
"extends": "airbnb-base", | ||
"plugins": [ | ||
"import", | ||
"babel" | ||
], | ||
"globals": { | ||
"chrome": true | ||
}, | ||
"rules": { | ||
"semi": "error", | ||
"quotes": ["error", "single"], | ||
"no-param-reassign": ["error", {"props": false}], | ||
"eol-last": "off", | ||
"no-plusplus": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,60 @@ | ||
*.xpi | ||
*.xpi | ||
lib/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// 既定の設定とユーザー設定を上書きするには、このファイル内に設定を挿入します | ||
{ | ||
"files.eol": "\n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "0.1.0", | ||
"command": "npm", | ||
"isShellCommand": true, | ||
"args": ["--no-color"], | ||
"showOutput": "always", | ||
"echoCommand": true, | ||
"suppressTaskName": true, | ||
"tasks": [ | ||
{ | ||
"taskName": "watch", | ||
"isBuildCommand": true, | ||
"isBackground": true, | ||
"args": [ | ||
"run", "watch" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
# [Japanize for Slack](https://addons.mozilla.org/ja/firefox/addon/japanizer-for-slack/) | ||
Slackのチームページを翻訳するFirefoxアドオンです | ||
|
||
|
||
## 参考 | ||
|
||
[japanizer-for-trello](https://github.com/iso2022jp/japanizer-for-trello) | ||
|
||
## コントリビューション | ||
|
||
1. リポジトリをフォーク | ||
1. 翻訳/新機能 ブランチを作成 (`git checkout -b my-translation`) | ||
1. 変更をコミット | ||
1. ブランチへプッシュ (`git push origin my-translation`) | ||
1. プルリクエストを作成 | ||
|
||
### Firefoxでのデバッグ | ||
|
||
1. ソースをローカルへクローン | ||
1. プラグインのルートフォルダへ移動 (`cd japanizer-slack`) | ||
1. node.js と npm をインストール | ||
1. npm で jpm をインストール (`npm install -g jpm`) | ||
1. [jpm](https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm) を起動 | ||
+ 新しいプロファイルでFirefoxを起動してデバッグする場合: `jpm run` | ||
+ 現在のFirefoxでデバッグする場合: `jpm watchpost --post-url http://localhost:8888` | ||
1. デバッグの終了 | ||
+ `jpm run` でのデバッグ: ブラウザを閉じる | ||
+ `jpm watchpost` でのデバッグ: `Ctrl` + `c` | ||
|
||
## 注意とか | ||
|
||
- Slackの公式ページやドキュメントページなどは翻訳しません (翻訳の正確性を保証できないため) | ||
- japanizer-for-trelloのソースを流用しているため、作者から申し出があった場合、公開は停止されます | ||
# [Japanize for Slack](#) | ||
Slackのチームページを翻訳するFirefoxアドオンです | ||
|
||
## コントリビューション | ||
|
||
1. リポジトリをフォーク | ||
1. 翻訳/新機能 ブランチを作成 (`git checkout -b my-translation`) | ||
1. 変更をコミット | ||
1. ブランチへプッシュ (`git push origin my-translation`) | ||
1. プルリクエストを作成 | ||
|
||
## 開発 | ||
|
||
### 翻訳用JSONフォーマット | ||
+ 通常のDOM `<a href="...">Foo</a>` | ||
- 値には文字列を設定 | ||
- `"path.to.foo": "ほげ"` ⇒ `<a href="...">ほげ</a>` | ||
+ 子要素を持つDOM `<p>bar<strong>baz</strong>foobar</p>` | ||
- 値には配列を設定 | ||
- DOM内のテキストノードと配列の値がマッピングされる | ||
- `"path.to.bar": ["ふが", "ほげふが"]` ⇒ `<p>ほげ<strong>baz</strong>ほげふが</p>` | ||
- 子要素は別途定義 | ||
- `"path.to.baz": "ぴよ"` ⇒ `<strong>ぴよ</strong>` | ||
|
||
### コンパイル | ||
|
||
+ コマンドラインから | ||
- `npm run watch` | ||
|
||
+ VSCodeから | ||
- <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> | ||
|
||
その後は自動でコンパイル(トランスパイル)します | ||
|
||
### Firefoxでのデバッグ | ||
|
||
1. ソースをローカルへクローン | ||
1. プラグインのルートフォルダへ移動 (`cd japanizer-slack`) | ||
1. node.js と npm をインストール | ||
1. npm で 必要なライブラリ をインストール (`npm install`) | ||
1. `gulp watch` を起動 | ||
1. about:debugging#addons へアクセス [詳細](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_first_WebExtension) | ||
+ アドオンのデバッグを有効化 にチェック | ||
+ 一時的なアドオンを読み込む で `manifest.json` を選択 | ||
+ Slack へアクセス | ||
+ ソース変更後はブラウザをリロード | ||
1. デバッグの終了 | ||
+ ブラウザを閉じる(?) | ||
|
||
## 注意とか | ||
|
||
- 翻訳の正確性は保証しません | ||
- Slackの公式ページやドキュメントページなどは翻訳しない予定です |
Oops, something went wrong.