Skip to content

Commit

Permalink
Fix document (#1)
Browse files Browse the repository at this point in the history
* Fix README (the descriptions of --culture and --verbose options)
* Fix NuGet package description
* Fix the workflow to run on 'pull_request'
  • Loading branch information
maroontress-tomohisa authored Aug 26, 2021
1 parent 2e0664f commit f08ccbd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnetcore3.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: .NET Core CI

on: [push]
on: [push, pull_request]

jobs:
build:
Expand Down
6 changes: 1 addition & 5 deletions PourOver.GlobalTool/PourOver.GlobalTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
<PackageProjectUrl>https://maroontress.github.io/PourOver/</PackageProjectUrl>
<RepositoryUrl>https://github.com/maroontress/PourOver</RepositoryUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>
PourOver is a command-line tool that diagnoses string resources stored in CSV
files expressed in multiple languages by comparing the tokens embedded in each
string between the languages.
</Description>
<Description>PourOver is a command-line tool that diagnoses string resources stored in CSV files expressed in multiple languages by comparing the tokens embedded in each string between the languages.</Description>
<PackageReleaseNotes>
See https://maroontress.github.io/PourOver/releasenotes.html
</PackageReleaseNotes>
Expand Down
16 changes: 10 additions & 6 deletions README.ja_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ BYE,Bye,さようなら

トークンは文字列リソースに組み込まれたプレイスホルダーで、ブレース(`{``}`)で囲まれた文字列です。例えば、次のような内容の文字列リソースがあるとします:

| ID | `English` | `Japanese` |
| :-- | :-- | :-- |
| `TIME` | `It's {hour} o'clock` | `{hour}時です` |
| `DEAR` | `Dear {name},` | `拝啓 {name} さん、` |
| ID | `English` | `Japanese` |
| :-- | :-- | :-- |
| `TIME` | `It's {hour} o'clock.` | `{hour}時です` |
| `DEAR` | `Dear {name},` | `拝啓 {name} さん、`  |

`TIME`の文字列リソースでは、どの言語においてもトークン`{hour}`が組み込まれ、表示する際に`{hour}`は現在の時刻の(時分秒の)時に置き換えられます。また、`DEAR`では、同様に`{name}`が組み込まれ、表示する際に`{name}`は人名に置き換えられます。

Expand All @@ -38,7 +38,11 @@ BYE,Bye,さようなら

診断メッセージは次のような形式になります:

> _ファイル名_ `:` _行番号_ `: ` _ID_ `: ` _診断メッセージ_
> _ファイル名_ `:` _行番号_ `: ` _ID_ `: ` _メッセージ_
`--verbose`を指定すると次のような形式になります:

> _ファイル名_ `:` _行番号_ `: ` _ID_ `: (` _診断ID_ `) ` _メッセージ_
## トークンの診断

Expand Down Expand Up @@ -171,7 +175,7 @@ _FILE_.csvは前述した構造のCSVファイルです。

| | Option | | Description |
|---:|:---|:---|:---|
| `-L`, | `--culture` | _CULTURE_ | カルチャーを指定します(例: `en_US`|
| `-L`, | `--culture` | _CULTURE_ | カルチャーを指定します(例: `en-US`|
| `-h`, | `--help` | | ヘルプメッセージを表示して終了します |
| `-b`, | `--ignore-blank` | | 空欄のフィールドを無視します |
| `-v`, | `--verbose` | | 出力が冗舌になります |
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ A token is a placeholder embedded in a string resource, which is a string
enclosed in braces (`{` and `}`). For example, you have string resources as
follows:

| ID | `English` | `Japanese` |
| :-- | :-- | :-- |
| `TIME` | `It's {hour} o'clock` | `{hour}時です` |
| `DEAR` | `Dear {name},` | `拝啓 {name} さん、` |
| ID | `English` | `Japanese` |
| :-- | :-- | :-- |
| `TIME` | `It's {hour} o'clock.` | `{hour}時です` |
| `DEAR` | `Dear {name},` | `拝啓 {name} さん、` |

The string resource `TIME` should include the token `{hour}` in all languages,
and the token `{hour}` is assumed to be replaced with the hour of the current
Expand All @@ -48,9 +48,13 @@ A string resource can contain multiple tokens.

## Diagnostic message

Each diagnostic message has the following format:
The format of each diagnostic message is as follows:

> _filename_ `:`_line_ `: ` _ID_ `: ` _diagnostic message_
> _FILENAME_ `:`_LINE_ `: ` _ID_ `: ` _MESSAGE_
It is as follows when you specify the `--verbose` option:

> _FILENAME_ `:`_LINE_ `: ` _ID_ `: (` _DIAGNOSTIC-ID_ `) ` _MESSAGE_
## Token diagnostics

Expand Down Expand Up @@ -204,7 +208,7 @@ Options are as follows:

| | Option | | Description |
|---:|:---|:---|:---|
| `-L`, | `--culture` | _CULTURE_ | Specify culture (e.g., `en_US`) |
| `-L`, | `--culture` | _CULTURE_ | Specify culture (e.g., `en-US`) |
| `-h`, | `--help` | | Show help message and exit |
| `-b`, | `--ignore-blank` | | Ignore blank fields |
| `-v`, | `--verbose` | | Be verbose |
Expand Down

0 comments on commit f08ccbd

Please sign in to comment.