Skip to content

Commit 74e1668

Browse files
committed
Update Japanese translation
1 parent 01f51e1 commit 74e1668

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

i18n/README-ja-jp.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* [その他](#その他)
3636
* [モジュール・パターン](#モジュールパターン)
3737
* [データ・マッパ](#データマッパ)
38-
* [Observer Pattern as an External Service](#observer-pattern-as-an-external-service)
38+
* [外部サービスとしてのオブザーバパターン](#外部サービスとしてのオブザーバパターン)
3939
* [References](#references)
4040

4141
<!--endtoc-->
@@ -48,7 +48,7 @@
4848

4949
## Translations
5050

51-
- [Japanese Translation](https://github.com/mgechev/angularjs-in-patterns/blob/master/i18n/README-ja-jp.md) by [morizotter](https://twitter.com/morizotter)
51+
- [Main](https://mgechev.github.io/angularjs-in-patterns/)
5252
- [Russian Translation](http://habrahabr.ru/post/250149/)
5353

5454
## はじめに
@@ -828,7 +828,7 @@ function ExampleCtrl($scope) {
828828

829829
JavaScriptコミュニティではこのパターンはパブリッシュ/サブスクライブとして知られています。
830830

831-
For a best practice example see [Observer Pattern as an External Service](#observer-pattern-as-an-external-service)
831+
ベストプラクティスの一例は [Observer Pattern as an External Service](#observer-pattern-as-an-external-service) を確認して下さい。
832832

833833
#### チェーン・オブ・レスポンシビリティ
834834

@@ -1094,17 +1094,15 @@ function MainCtrl($scope, User) {
10941094
</div>
10951095
```
10961096
1097-
### Observer Pattern as an External Service
1097+
### 外部サービスとしてのオブザーバパターン
10981098
1099-
##### About
1099+
##### 概要
11001100
1101-
Below is an example taken from [here](https://github.com/greglbd/angular-observer-pattern). This is an angular factory which creates a service implementing the Observer Pattern. It works well with the ControllerAs method of working as it can be much more efficient that `$scope.$watch` and more specific to a unique scope or object than $emit and $broadcast when used correctly.
1101+
下記の例は[こちら](https://github.com/greglbd/angular-observer-pattern)から持ってきたものです。これはオブザーバパターンを実装したサービスを生成するファクトリです。 正しく使われた場合、`$scope.$watch` より効率的で、$emitや$broadcastよりもスコープやオブジェクトに限定して使えるControllerAsメソッドとよく協調して機能します。
11021102
1103-
**Use Case:** You would use this pattern to communicate between 2 controllers that use the same model but are not connected in anyway.
1103+
##### コントローラの例
11041104
1105-
##### Controller Example
1106-
1107-
Below example shows how to attach, notify and detach an event.
1105+
イベントのアタッチ、通知、デタッチの例を示します。
11081106
11091107
```javascript
11101108
angular.module('app.controllers')
@@ -1127,7 +1125,8 @@ function ObserverExample(ObserverService, $timeout) {
11271125
}, 5000);
11281126
}
11291127
```
1130-
Alternative way to remove event
1128+
1129+
イベントを削除する別の方法
11311130
11321131
```javascript
11331132
angular.module('app.controllers')
@@ -1147,7 +1146,7 @@ function ObserverExample(ObserverService, $timeout, $scope) {
11471146
ObserverService.notify('let_me_know');
11481147
}, 5000);
11491148

1150-
// Cleanup listeners when this controller is destroyed
1149+
// コントローラが破棄された時にリスナーを外します
11511150
$scope.$on('$destroy', function handler() {
11521151
ObserverService.detachByEvent('let_me_know')
11531152
});

0 commit comments

Comments
 (0)