Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConEmu/ConEmu.l10n Add Japanese #1866

Closed
wants to merge 2 commits into from
Closed

Conversation

@eamat-dot
Copy link
Contributor

@eamat-dot eamat-dot commented Mar 18, 2019

Add Japanese

Copy link
Owner

@Maximus5 Maximus5 left a comment

There is a helper script Deploy\rc2json.ps1. I do run it to update and validate this l10n file. E.g.:

powershell -noprofile -command .\Deploy\rc2json.ps1

Loading

"id": 45 }
,
"lng_SpgMarkCopy": {
"en": "Mark/Copy",
"ru": "Выделение",
"zh": "标记/复制",
"de": "Markieren/Kopieren",
<<<<<<< HEAD
Copy link
Owner

@Maximus5 Maximus5 Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct these lines. Which translation is correct?

Loading

"id": 2943 }
,
"gbIntgrHere": {
"en": "ConEmu Here - Explorer context menu integration",
"zh": "这里打开ConEmu - Explorer右键菜单集成",
"de": "ConEmu - Explorer-Kontextmenü-Integration",
"ja": "ConEmu Here - Explorerのコンテキストメニューの統合",
"id": 2915 }
,
"gbIntgrInside": {
"en": "ConEmu Inside - Explorer context menu integration",
"zh": "里面打开ConEmu - Explorer右键菜单集成",
"de": "ConEmu-Intern - Explorer-Kontextmenü-Integration"
Copy link
Owner

@Maximus5 Maximus5 Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Merge conflict.

Loading

"id": 1731 }
}
}
Copy link
Owner

@Maximus5 Maximus5 Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add new line

Loading

"id": 52 }
,
"lng_SpgFeatures": {
"en": "Features",
"ru": "Параметры",
"zh": "特征",
"de": "Funktionen",
<<<<<<< HEAD
Copy link
Owner

@Maximus5 Maximus5 Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict

Loading

@eamat-dot
Copy link
Contributor Author

@eamat-dot eamat-dot commented Mar 20, 2019

I'm sorry!
I was very sorry to send you the wrong file.
And thank you for giving me a way of verification
I pushed the file that I was able to pass safely again.

Postscript:
PowerShell Core was required to run rc2json.ps1.
In my environment WindowsPowerShell couldn't run due to an error.
It may not be necessary, but the log is shown below

Active code page: 437
PS E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat> powershell -noprofile -command .\Deploy\rc2json.ps1
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1050 char:28
+       $key = "・+$key.Trim("'")+"・
+                            ~~~~~~
Unexpected token ''")+"・
    }
  }
  # ready
  if ($mod -ne "") { $ready = ($mod.Replace(",","+") + "+" + $key) } else { $ready = $key }
  # Show "Pause" instead of single "Break"
  if ($ready -eq "Break") { $ready = "Pause" }
  return $ready
}
function SplitHotkey($line)
{
  # 0             1         2     3               4                          5      6                       7
  # vkMultiClose, chk_User, NULL, L"Multi.Close", CConEmuCtrl::key_GuiMacro, false, L"Close(0)")->SetHotKey(VK_DELETE,V
K_LWIN);
  $tokens = @()
  for ($i = 0; $i -le 8; $i++) { $tokens += @("") }
  #Write-Host -ForegroundColor DarkYellow "--`n$line"
  # First - cut of hotkeys themself
  $l = $line.IndexOf(")->SetHotKey(")
  if ($l -gt 0) {
    $keys = $line.SubString($l + ")->SetHotKey(".Length)
    $l2 = $keys.LastIndexOf(")")
    if ($l2 -gt 0) {
      $keys = $keys.Remove($l2)
    }
    $tokens[7] = $keys
    $line = $line.Remove($l)
    #Write-Host $line
  }
  # Now we are ready to parse the line
  for ($i = 0; ($i -le 5) -And ($line -ne ""); $i++) {
    $l = $line.IndexOf(",")
    if ($l -gt 0) {
      $tokens[$i] = $line.SubString(0, $l).Trim()
      $line = $line.Remove(0, $l+1).Trim()
    } else {
      $tokens[$i] = $line.Trim()
      $line = ""
    }
  }
  if (($line -ne "") -And ($line.StartsWith("L`""))) {
    $macro = $line.SubString(1).TrimEnd('' in expression or statement.
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1049 char:12
+     } else {
+            ~
Missing closing '}' in statement block or type definition.
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1046 char:57
+   if (($key.StartsWith("'")) -And ($key.EndsWith("'"))) {
+                                                         ~
Missing closing '}' in statement block or type definition.
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1016 char:1
+ {
+ ~
Missing closing '}' in statement block or type definition.
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1093 char:43
+     $macro = $line.SubString(1).TrimEnd(' );')
+                                           ~
Unexpected token ')' in expression or statement.
At E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat\Deploy\rc2json.ps1:1511 char:51
+         if ($script:items[$i].Title.Trim().Trim('.').Length -ge 1) {
+                                                   ~~~~~~~~~~~~~~~~~~
The string is missing the terminator: '.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : UnexpectedToken


PS E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.407
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.407
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


PS E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_eamat> Get-WmiObject Win32_OperatingSystem


SystemDirectory : C:\WINDOWS\system32
Organization    :
BuildNumber     : 17134
RegisteredUser  :
SerialNumber    : 00330-80000-00000-AA103
Version         : 10.0.17134

Loading

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Mar 22, 2019

Thanks for the update!
I do use Powershell 5.1.18356.1. The problem, I think, is that my script contains symbols from codepage 1252. Please check updated script from daily branch.

Loading

Copy link
Owner

@Maximus5 Maximus5 left a comment

pwsh do something strange and unexpected, thank you for noting me :(
Please use powershell.exe with updated script.

For new language pull request it's expected to be containing only green lines (no red lines).

Loading

@@ -1,4 +1,4 @@
{
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like script started by pwsh removed UTF-8 BOM :(

Loading

"ru": "Добавить шрифт в ‘...\\Console\\TrueTypeFont’",
"zh": "添加字体到‘...\\Console\\TrueTypeFont’",
"de": "Füge Schriftart zu '...\\Console\\TrueTypeFont' hinzu",
"en": "Add font to �...\\Console\\TrueTypeFont�",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"en": "‘Color key’ transparency",
"zh": "‘颜色键’ 透明度",
"de": "'Schlüsselfarben'-Transparenz",
"en": "�Color key� transparency",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"en": "‘Host-key’+Number iterates Far windows",
"zh": "‘Host-key’+数字迭代Far窗口",
"de": "'Host-Taste'+Zahl wechselt durch die Far-Fenster",
"en": "�Host-key�+Number iterates Far windows",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"en": "Show ‘... was hidden’ warning in TSA",
"zh": "在任务栏状态区域显示“... 被隐藏”警告",
"de": "Zeige '... wurde versteckt'-Warnung im Infobereich",
"en": "Show �... was hidden� warning in TSA",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"id": 2940 }
,
"stFarTabTemplates": {
"en": [ "%s - Title, %c - Console #, %n - Active process name, %p - PID, %a - ‘Admin’, %% - %,\n"
, "%m...m, %M...M - mark ‘...’ for active (m) and inactive (M) tab\n"
"en": [ "%s - Title, %c - Console #, %n - Active process name, %p - PID, %a - �Admin�, %% - %,\n"
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

, "‘%3’ - C:\\Path\\File, ‘%4’ - C:/Path/File, ‘%5’ - /C/Path/File\n"
, "Use ‘#’ prefix to run editor outside of ConEmu" ],
"zh": [ "可用的宏: ‘%1’ - 行数, ‘%2’ - 列数\n"
"en": [ "Available macros: �%1� - line number, �%2� - column number\n"
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"en": "For example: True Type font ‘Lucida Console’ 5x3",
"zh": "例如: True Type 字体 ‘Lucida Console’ 5x3",
"de": "Zum Beispiel: True-Type-Schrift 'Lucida Console' 5x3",
"en": "For example: True Type font �Lucida Console� 5x3",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"id": 2984 }
,
"stTabTemplateDescr": {
"en": [ "%s - Title, %c - Console #, %n - Active process name, %p - PID,\n"
, "%m...m, %M...M - mark ‘...’ for active (m) and inactive (M) tab\n"
, "%a - ‘Admin’, %d - current shell directory, %f - folder, %% - %" ],
, "%m...m, %M...M - mark �...� for active (m) and inactive (M) tab\n"
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

"ru": "Выполнить после обновления, не забудьте «call» для вызова bat/cmd файлов",
"zh": "更新后命令,不要忘记从批处理“调用”",
"de": "Befehl nach Aktualisierung, für Batch 'call' nicht vergessen",
"en": "Post-update command, don't forget �call� for batches",
Copy link
Owner

@Maximus5 Maximus5 Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script fails on UTF-8 :(

Loading

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Mar 22, 2019

If you can't manage the change, I can do this manually...

Loading

@eamat-dot
Copy link
Contributor Author

@eamat-dot eamat-dot commented Mar 23, 2019

Thank you for taking the time to confirm my ugly update work.

As you point out, pwsh seems to delete the UTF-8 BOM.
There was a backup file before pwsh was destroyed, so I used it and ran rc2json.ps1 from powershell.exe.
As a result, ConEmu.l10n was updated with the UTF-8 BOM file, but unfortunately the updated file was "garbled".
A string containing (U 2018) is combined with the preceding and following characters.

I thought that it might be the result of my editing and tried the original ConEmu.l10n, but the same thing happens.
This may be due to the locale of my environment.
I tried three types of chcp switching, but it didn't work out.

chcp 437 
chcp 65001
chcp 932 
Active code page: 437
PS E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily> powershell -noprofile -command .\Deploy\rc2json.ps1
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\ConEmu.rc Lines: 1713
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\LngDataHints.h Lines: 480
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\LngDataRsrcs.h Lines: 119
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\resource.h Lines: 1355
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\MenuIds.h Lines: 87
Reading: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\src\ConEmu\LngDataEnum.h Lines: 122
Section: cmnhints
Already deprecated: cbFarHourglass / _zh
Already deprecated: cbFixFarBorders / _zh
Already deprecated: cbTrueColorer / _zh
Already deprecated: tFontFace2 / _zh
Already deprecated: tFontSizeX2 / _zh
Already deprecated: tHereShell / _zh
Already deprecated: vkMultiNewConfirm / _zh
Already deprecated: vkMultiWndConfirm / _zh
Section: mnuhints
Section: strings
Already deprecated: lng_SpgFonts / _zh
Already deprecated: lng_UpdateCloseMsg1 / _zh
Parsing dialog resources
Invalid string, bad token: PUSHBUTTON      "Add font to ・..\\Console\\TrueTypeFont・,bConFontAdd2HKLM,11,102,214,14,WS_DISABLED
  Dialog IDD_FAST_CONFIG: ConEmu fast configuration
    Duplicate control ID=BS_AUTORADIOBUTTON
      New: '善review・,rbAutoUpdatePreviewFast,'
      Old: '全table・,rbAutoUpdateStableFast,'
  Dialog IDD_SPG_GENERAL: General
    Duplicate control ID=BS_AUTORADIOBUTTON
      New: '善review・,rbAutoUpdatePreviewFast,'
      Old: '全table・,rbAutoUpdateStableFast,'
Section: controls
Already deprecated: cbAddDefaults / _zh
Already deprecated: cbAutoRegFonts / _zh
Already deprecated: cbCmdTaskbarCommands / _zh
Already deprecated: cbCmdTaskbarTasks / _zh
Deprecation: cbColorKeyTransparent;
  old: '‘Color key’ transparency'
  new: '舛olor key・transparency'
Already deprecated: cbExtendFonts / _zh
Already deprecated: cbExtendFontsOverride / _zh
Already deprecated: cbFarHourglass / _zh
Already deprecated: cbFontMonitorDpi / _zh
Already deprecated: cbInstallKeybHooks / _zh
Deprecation: cbMultiIterate;
  old: '‘Host-key’+Number iterates Far windows'
  new: '践ost-key・Number iterates Far windows'
Already deprecated: cbProcessAnsi / _zh
Already deprecated: cbRunInNewWindow / _zh
Deprecation: cbShowWasHiddenMsg;
  old: 'Show ‘... was hidden’ warning in TSA'
  new: 'Show ・.. was hidden・warning in TSA'
Deprecation: cbShowWasSetOnTopMsg;
  old: 'Show ‘... brought ConEmu OnTop. Revert?’ confirmation box'
  new: 'Show ・.. brought ConEmu OnTop. Revert?・confirmation box'
Already deprecated: cbSuppressBells / _zh
Already deprecated: cbUseKeyboardHooksFast / _zh
Deprecation: cbUserScreenTransparent;
  old: '‘User screen’ transparency (Far Manager feature)'
  new: '繕ser screen・transparency (Far Manager feature)'
Already deprecated: gbCtrlIntercept / _zh
Deprecation: rbAutoUpdateDeveloperFast;
  old: '‘Alpha’ builds'
  new: '羨lpha・builds'
Already deprecated: rbAutoUpdateDeveloperFast / _zh
Deprecation: stCmdAutoAttach;
  old: '[HKEY_CURRENT_USER\\Software\\Microsoft\\Command Processor]\nCurrent command stored in registry ‘AutoRun’ (HKLM value is not processed here):'
  new: '[HKEY_CURRENT_USER\\Software\\Microsoft\\Command Processor]\nCurrent command stored in registry 羨utoRun・(HKLM value is not processed here):'
Already deprecated: stColorSchemeFast / _zh
Deprecation: stDefaultTerminal;
  old: 'List of hooked executables or window class names delimited with ‘|’\r\nExample: explorer.exe|devenv.exe|wdexpress.exe|totalcmd.exe|TaskManagerWindow'
  new: 'List of hooked executables or window class names delimited with 掃箪r\nExample: explorer.exe|devenv.exe|wdexpress.exe|totalcmd.exe|TaskManagerWindow'
Deprecation: stDisableConImeFast1;
  old: 'Unwanted value of ‘LoadConIme’ registry parameter! This may cause hanging of other console applications! ConEmu may disable ConIme.exe via registry:'
  new: 'Unwanted value of 銑oadConIme・registry parameter! This may cause hanging of other console applications! ConEmu may disable ConIme.exe via registry:'
Already deprecated: stEnableAutoUpdateFast / _zh
Deprecation: stFarTabTemplates;
  old: '%s - Title, %c - Console #, %n - Active process name, %p - PID, %a - ‘Admin’, %% - %,\n%m...m, %M...M - mark ‘...’ for active (m) and inactive (M) tab\n%i - Far window number (you can see it in standard F12 menu)'
  new: '%s - Title, %c - Console #, %n - Active process name, %p - PID, %a - 羨dmin・ %% - %,\n%m...m, %M...M - mark ・..・for active (m) and inactive (M) tab\n%i - Far window number (you can see it in standard F12 menu)'
Already deprecated: stFarTabTemplates / _zh
Deprecation: stGotoEditorCmdHelp;
  old: 'Available macros: ‘%1’ - line number, ‘%2’ - column number\n‘%3’ - C:\\Path\\File, ‘%4’ - C:/Path/File, ‘%5’ - /C/Path/File\nUse ‘#’ prefix to run editor outside of ConEmu'
  new: 'Available macros: ・1・- line number, ・2・- column number\n・3・- C:\\Path\\File, ・4・- C:/Path/File, ・5・- /C/Path/File\nUse ・・prefix to run editor outside of ConEmu'
Already deprecated: stInjectConEmuHkFast / _zh
Deprecation: stMoreConfont4;
  old: 'For example: True Type font ‘Lucida Console’ 5x3'
  new: 'For example: True Type font 銑ucida Console・5x3'
Already deprecated: stSingleInstance / _zh
Deprecation: stTabTemplateDescr;
  old: '%s - Title, %c - Console #, %n - Active process name, %p - PID,\n%m...m, %M...M - mark ‘...’ for active (m) and inactive (M) tab\n%a - ‘Admin’, %d - current shell directory, %f - folder, %% - %'
  new: '%s - Title, %c - Console #, %n - Active process name, %p - PID,\n%m...m, %M...M - mark ・..・for active (m) and inactive (M) tab\n%a - 羨dmin・ %d - current shell directory, %f - folder, %% - %'
Already deprecated: stTabTemplateDescr / _zh
Deprecation: stUpdatePostCommand;
  old: 'Post-update command, don't forget ‘call’ for batches'
  new: 'Post-update command, don't forget 祖all・for batches'
Already deprecated: stUseKeyboardHooksFast / _zh
Updating: E:\_user\MyDoc\_GitHub_clone\ConEmu_fork\ConEmu_master_daily\Deploy\..\Release\ConEmu\ConEmu.l10n
All done

Loading

@eamat-dot
Copy link
Contributor Author

@eamat-dot eamat-dot commented Mar 23, 2019

I added two files to my fork daily branch

  • The file ConEmu_broken.l10n (causes" garbage "and probably can not be used as it is) through rc2json.ps1

  • The file ConEmu.l10n which does not pass rc2json.ps1 (The file which has not caused" garbled ". The operation check with the script has not been done, but the visual check with diff was done temporarily)
    I am very sorry and very sorry, but I am glad to get your help.

Loading

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Mar 23, 2019

I've rebased your commit with my fixes
83fd28a
555599c

Loading

@Maximus5 Maximus5 closed this Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants