-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dict: update smudge table for bg for new keepwords
Signed-off-by: Jiang Xin <[email protected]>
- Loading branch information
Showing
2 changed files
with
18 additions
and
14 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 |
---|---|---|
|
@@ -79,6 +79,10 @@ func init() { | |
Pattern: "———", | ||
Replace: "---", | ||
}, | ||
{ | ||
Pattern: "…", | ||
Replace: "...", | ||
}, | ||
|
||
// Revert translated email address | ||
{ | ||
|
@@ -90,6 +94,14 @@ func init() { | |
Replace: "[email protected]", | ||
}, | ||
|
||
/* | ||
* Add "<>" markers for param1 and param2 | ||
*/ | ||
{ | ||
Pattern: "files,ПАРАМЕТЪР_1,ПАРАМЕТЪР_2", | ||
Replace: "files,<ПАРАМЕТЪР_1>,<ПАРАМЕТЪР_2>", | ||
}, | ||
|
||
/* | ||
* The <place-holder> in format string was translated without "<>", e.g.: | ||
* | ||
|
@@ -133,21 +145,13 @@ func init() { | |
* msgid "git restore [<...>] [--source=<...>] <file>..." | ||
* msgstr "git restore [ОПЦИЯ…] [--source=КЛОН] ФАЙЛ…" | ||
* | ||
* We will get the keep words as follows from patten defined in KeepWordsPattern. | ||
* | ||
* msgid: --source= | ||
* msgstr: --source=K | ||
* Use the pattern below, we can rewrite "--source=КЛОН" in msgstr to: | ||
* | ||
* This will cause false positive report of typos. Hack as follows: | ||
* --source=<...> | ||
*/ | ||
{ | ||
Pattern: regexp.MustCompile(`(--[^\s]+=)<\.\.\.>`), | ||
Replace: "$1 ...", | ||
Reverse: true, | ||
}, | ||
{ | ||
Pattern: regexp.MustCompile(`(--[^\s]+=)([a-zA-Z-]*[^a-zA-Z0-9\s-"]+[a-zA-Z0-9-]*)`), | ||
Replace: "$1 $2", | ||
Pattern: regexp.MustCompile(`(--[a-zA-Z0-9-]+)=([a-zA-Z0-9-]*[^a-zA-Z0-9<>\[\]()%\s"',*-]+[^<>\[\]()%\s"',*]*)`), | ||
Replace: "$1=<...>", | ||
}, | ||
|
||
/* | ||
|
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