diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1cc4b76..ac25425 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## Unreleased
-- **Language picker.** Under Settings › General › Appearance › Language, search by name or code and choose Automatic, Español, English, Deutsch or 한국어, each marked as complete.
+- **Language picker.** Under Settings › General › Appearance › Language, search by name or code and choose Auto, Español, English, Deutsch or 한국어, each marked as complete.
- **English interface.** Stackshot follows the Windows language: English on an English Windows, and English can be chosen under Settings › General › Appearance › Language. Contributed by @altmashnaveed (PR #12).
- **Korean interface.** Select 한국어 in the language picker or use Automatic on Korean Windows. Existing language preferences are preserved. Contributed by @Hobeom (PR #30).
- **German, complete.** The German interface that arrived with PR #13 (by Aamer Shahzad) now covers the whole app: capture and the area picker, the editor, recording and the video tools, the desktop mascot included, the Home window, history, reports and the Markdown and XML viewers. Notices keep their kind in every language (their kind comes from the text's key, not from the words of one language), a document that is not UTF-8 is rescued the same in all languages, and shown numbers use each language's own thousands and decimal marks. The in-app news come in the interface language (Spanish, English, German and Korean).
diff --git a/README.md b/README.md
index 830a48c..40f9cd9 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ For Windows 10 and 11 · Version 2.1.0 · Also as an [MSI package](https://githu
**Contents:** [Three steps](#three-steps-no-menus) · [What's new](#whats-new-in-21) · [Features](#features-at-a-glance) · [Modes](#seven-ways-to-capture) · [Capture](#select-snap-done) · [Mark up](#mark-it-up-in-seconds) · [Hide data](#hide-it-before-you-share-it) · [Scrolling](#capture-the-whole-page) · [Record](#record-your-screen-with-sound) · [History](#find-it-by-what-it-said) · [XML and Markdown](#xml-and-markdown-upgraded) · [Main window](#one-window-your-way) · [Pixel](#meet-pixel-39-costumes) · [More](#and-so-much-more) · [Performance](#small-fast-private) · [Installation](#installation) · [Command line](#command-line-and-it-policies) · [Shortcuts](#keyboard-shortcuts) · [Privacy](#privacy-and-security) · [FAQ](#faq) · [Build](#building-from-source) · [License](#license)
> [!NOTE]
-> The user interface is in Spanish, English, German and Korean: a new installation follows your Windows language (Automatic), and **Settings › General › Appearance › Language** changes it at any time. Screenshots on this page show the Spanish interface.
+> The user interface is in Spanish, English, German and Korean: a new installation follows your Windows language (Auto), and **Settings › General › Appearance › Language** changes it at any time. Screenshots on this page show the Spanish interface.
## Three steps, no menus
@@ -649,7 +649,7 @@ Running `Stackshot.exe` offers to install it for your user (no administrator rig
Is there an English interface?
-Yes. Stackshot speaks Spanish, English, German and Korean. A new installation follows the Windows display language (Korean on a Korean Windows; Spanish on a Spanish, Catalan, Galician or Basque Windows; German on a German one; English everywhere else), and **Settings › General › Appearance › Language** switches it at once (Automatic, Español, English, Deutsch, 한국어), at setup or from the tray. Those who already used Stackshot keep Spanish; if their Windows is in another language, the matching language is offered once, and nothing changes unless they accept. The English translation was contributed by [@altmashnaveed](https://github.com/altmashnaveed) and the Korean one by [@Hobeom](https://github.com/Hobeom); German and the secrets redaction came from PR #13 by [@aamershahzad2](https://github.com/aamershahzad2).
+Yes. Stackshot speaks Spanish, English, German and Korean. A new installation follows the Windows display language (Korean on a Korean Windows; Spanish on a Spanish, Catalan, Galician or Basque Windows; German on a German one; English everywhere else), and **Settings › General › Appearance › Language** switches it at once (Auto, Español, English, Deutsch, 한국어), at setup or from the tray. Those who already used Stackshot keep Spanish; if their Windows is in another language, the matching language is offered once, and nothing changes unless they accept. The English translation was contributed by [@altmashnaveed](https://github.com/altmashnaveed) and the Korean one by [@Hobeom](https://github.com/Hobeom); German and the secrets redaction came from PR #13 by [@aamershahzad2](https://github.com/aamershahzad2).
## Building from source
diff --git a/docs/novedades.ko.md b/docs/novedades.ko.md
index 10034de..0a85ae7 100644
--- a/docs/novedades.ko.md
+++ b/docs/novedades.ko.md
@@ -2,9 +2,9 @@
## 2.2.2
-- **영어 인터페이스.** Stackshot은 Windows 언어를 따릅니다. 영어 Windows에 새로 설치하면 영어로 열립니다. 설정 > 일반 > 화면 모양 > 언어에서 바꿀 수 있습니다.
+- **영어 인터페이스.** Stackshot은 Windows 언어를 따릅니다. 영어 Windows에 새로 설치하면 영어로 열립니다. 설정 › 일반 › 화면 모양 › 언어에서 바꿀 수 있습니다.
- **독일어 번역 완료.** 이제 캡처, 편집기, 녹화, 마스코트, 홈, 기록, 보고서까지 앱 전체를 독일어로 사용할 수 있습니다.
-- **한국어 인터페이스.** 설정 > 일반 > 화면 모양 > 언어에서 한국어를 선택할 수 있습니다. 번역해 주신 @Hobeom 님께 감사드립니다.
+- **한국어 인터페이스.** 설정 › 일반 › 화면 모양 › 언어에서 한국어를 선택할 수 있습니다. 번역해 주신 @Hobeom 님께 감사드립니다.
- **새 언어 선택기.** 이름이나 코드로 언어를 검색할 수 있고, 각 언어에 번역이 완료되었다고 표시됩니다.
- **자동 언어와 한 번만 나오는 제안.** 자동 모드는 Windows 언어(스페인어, 영어, 독일어, 한국어)를 따릅니다. 이미 스페인어로 Stackshot을 쓰고 있는데 Windows가 다른 언어라면 맞는 언어로 바꿀지 한 번만 묻습니다. 수락하지 않으면 아무것도 바뀌지 않습니다.
- **어떤 언어에서도 민감한 정보 가림.** 인터페이스 언어와 관계없이 캡처에서 민감한 정보를 찾아 가리는 방식은 같습니다.
diff --git a/docs/novedades.md b/docs/novedades.md
index 337b1f6..b6077b8 100644
--- a/docs/novedades.md
+++ b/docs/novedades.md
@@ -7,9 +7,9 @@ Formato: una sección `## X.Y.Z` por versión y, en ella, una línea por novedad
## 2.2.2
-- **Interfaz en inglés.** Stackshot sigue el idioma de Windows: una instalación nueva en un Windows en inglés se abre en inglés. Puedes cambiarlo en Ajustes > General > Apariencia > Idioma.
+- **Interfaz en inglés.** Stackshot sigue el idioma de Windows: una instalación nueva en un Windows en inglés se abre en inglés. Puedes cambiarlo en Ajustes › General › Apariencia › Idioma.
- **Alemán completo.** El alemán cubre ya toda la aplicación: captura, editor, grabación, la mascota, Inicio, el historial y los informes.
-- **Interfaz en coreano.** Elige 한국어 en Ajustes > General > Apariencia > Idioma. Gracias a @Hobeom por la traducción.
+- **Interfaz en coreano.** Elige 한국어 en Ajustes › General › Apariencia › Idioma. Gracias a @Hobeom por la traducción.
- **Selector de idioma nuevo.** Busca el idioma por nombre o por código; cada uno indica que su traducción está completa.
- **Idioma automático y una oferta única.** El modo automático sigue el idioma de Windows (español, inglés, alemán o coreano). Si ya usabas Stackshot en español en un Windows en otro idioma, se te ofrece una sola vez el idioma que corresponde; si no aceptas, no cambia nada.
- **Datos sensibles tapados en cualquier idioma.** Detectar y tapar los datos sensibles de una captura funciona igual sea cual sea el idioma de la interfaz.
diff --git a/src/Capture/Hotkeys.cs b/src/Capture/Hotkeys.cs
index b60f87f..eb65f8b 100644
--- a/src/Capture/Hotkeys.cs
+++ b/src/Capture/Hotkeys.cs
@@ -204,6 +204,8 @@ public static string Display(string combos)
return DisplayOne(parts[0]);
}
+ internal static string CtrlF { get { return (I18n.IsGerman ? "Strg" : "Ctrl") + "+F"; } }
+
public static string DisplayOne(string combo)
{
uint mods;
@@ -280,7 +282,7 @@ public static string KeyName(Keys key)
case Keys.LaunchApplication1: return I18n.T("Aplicaci\u00F3n 1", "App 1", "App 1");
case Keys.LaunchApplication2: return I18n.T("Calculadora", "Calculator", "Rechner");
case Keys.SelectMedia: return I18n.T("Multimedia", "Media", "Medien");
- case Keys.Sleep: return I18n.T("Suspender", "Sleep", "Ruhezustand");
+ case Keys.Sleep: return I18n.IsKorean ? "\uC808\uC804" : I18n.T("Suspender", "Sleep", "Ruhezustand");
}
if (key >= Keys.D0 && key <= Keys.D9) return ((char)('0' + (key - Keys.D0))).ToString();
if (key >= Keys.NumPad0 && key <= Keys.NumPad9) return "Num " + (char)('0' + (key - Keys.NumPad0));
diff --git a/src/Capture/RecordSetup.cs b/src/Capture/RecordSetup.cs
index b8e1a30..87caa5d 100644
--- a/src/Capture/RecordSetup.cs
+++ b/src/Capture/RecordSetup.cs
@@ -24,6 +24,7 @@ public sealed class RecordSetup : Sheet
// Shown order (Estandar, Alta, Maxima, Cine) to Recorder's quality numbers.
internal static readonly int[] QualityOrder = { Recorder.Standard, Recorder.High, Recorder.Maximum, Recorder.Cinema };
internal static readonly int[] Countdowns = { 0, 3, 5, 10 };
+ internal static string Seconds(int s) { return I18n.T(s + " s", s + " s"); }
// The frame rates offered; a stored value outside them is snapped so what is shown is what gets recorded.
internal static readonly int[] VideoFpsOptions = { 24, 30, 60 }, GifFpsOptions = { 10, 15, 20, 25 };
static readonly string[] QualityNotesEs =
@@ -190,7 +191,7 @@ void Build()
f.Changed += delegate(int i) { gifFps = GifFpsOptions[i]; };
Row(rows, I18n.T("Fotogramas", "Frame rate"), f, I18n.T("por segundo", "per second"));
}
- MacSegmented cd = new MacSegmented(new string[] { I18n.T("No", "None", "Aus"), "3 s", "5 s", "10 s" }, Math.Max(0, Array.IndexOf(Countdowns, countdown)));
+ MacSegmented cd = new MacSegmented(new string[] { I18n.T("No", "None", "Aus"), Seconds(3), Seconds(5), Seconds(10) }, Math.Max(0, Array.IndexOf(Countdowns, countdown)));
cd.Changed += delegate(int i) { countdown = Countdowns[i]; };
Row(rows, I18n.T("Cuenta atr\u00E1s", "Countdown"), cd, null);
diff --git a/src/Capture/ScrollCapture.cs b/src/Capture/ScrollCapture.cs
index bb83ff5..09bfd0a 100644
--- a/src/Capture/ScrollCapture.cs
+++ b/src/Capture/ScrollCapture.cs
@@ -827,9 +827,11 @@ void Done(Bitmap result, string problem)
owner.SaveCapture(result, I18n.T("Desplazamiento", "Scrolling"));
// Auto ended without the page moving: say why it is only one screen, and what usually helps.
if (plain && !plainOk)
- owner.Notify(I18n.T("Captura con desplazamiento", "Scrolling capture"), I18n.T("La zona no se ha movido, as\u00ED que se ha guardado como una captura normal. Elige solo la parte que se desplaza (la lista o el texto), sin la cabecera fija.", "The area did not scroll, so it was saved as a normal capture. Choose only the part that scrolls (the list or text), without the fixed header."));
+ owner.Notify(I18n.T("Captura con desplazamiento", "Scrolling capture"), PlainNotice);
}
+ internal static string PlainNotice { get { return I18n.T("La zona no se ha movido, as\u00ED que se ha guardado como una captura normal. Elige solo la parte que se desplaza, sin la cabecera fija.", "The area did not scroll, so it was saved as a normal capture. Choose only the part that scrolls (the list or text), without the fixed header."); } }
+
// Synthetic wheel (SendInput) and key polling without registering hotkeys.
[StructLayout(LayoutKind.Sequential)]
@@ -938,6 +940,9 @@ internal static string HeightText(int h, int areaHeight)
return sc + " \u00B7 " + h.ToString("N0", I18n.Culture) + " px";
}
+ internal static string AutoLabel { get { return I18n.Own("Auto", "Auto", "Auto", "\uC790\uB3D9"); } }
+ internal static string PauseLabel { get { return I18n.IsKorean ? "\uBA48\uCDA4" : I18n.T("Pausa", "Pause"); } }
+
// Layout in body coordinates.
Rectangle AutoRect() { return new Rectangle(body.Width - P(40) - P(78) - P(6) - P(64), P(9), P(64), body.Height - P(18)); }
Rectangle DoneRect() { return new Rectangle(body.Width - P(40) - P(78), P(9), P(78), body.Height - P(18)); }
@@ -1003,7 +1008,7 @@ protected override void PaintSurface(System.Windows.Media.DrawingContext dc, int
ai.Inflate(-0.5, -0.5);
dc.DrawRoundedRectangle(null, pen, ai, ai.Height / 2, ai.Height / 2);
}
- Ink.Center(dc, Ink.Px(session.Auto ? I18n.T("Pausa", "Pause") : "Auto", Ds.Semibold, P(13), autoInk), ar);
+ Ink.Center(dc, Ink.Px(session.Auto ? PauseLabel : AutoLabel, Ds.Semibold, P(13), autoInk), ar);
// Never lighter than the accent, so the white label keeps 4.5:1.
System.Windows.Rect dr = R(DoneRect());
diff --git a/src/Editor/BgPanel.Access.cs b/src/Editor/BgPanel.Access.cs
index 5ec18bd..1f9df8e 100644
--- a/src/Editor/BgPanel.Access.cs
+++ b/src/Editor/BgPanel.Access.cs
@@ -11,6 +11,8 @@ namespace Stackshot
{
public partial class BgPanel
{
+ internal static string SliderRange { get { return I18n.T("De 0 a 100", "From 0 to 100", "Von 0 bis 100"); } }
+
protected override AccessibleObject CreateAccessibilityInstance() { return new PanelAccess(this); }
// A choice made from a reader, as a click on it makes it.
@@ -89,7 +91,7 @@ protected override void Fill(List into)
a = NewPart(into, it.Label, AccessibleRole.Slider, r);
a.PartState = StateOf(p.Enabled, false, false);
a.PartValue = p.ValueOf(it).ToString(CultureInfo.CurrentCulture);
- a.PartHelp = "De 0 a 100";
+ a.PartHelp = SliderRange;
a.SetValue = delegate(string v) { p.AccessSlide(item, v); };
continue;
case Kind.Check:
diff --git a/src/Editor/ShareCheck.cs b/src/Editor/ShareCheck.cs
index 2971761..9606b04 100644
--- a/src/Editor/ShareCheck.cs
+++ b/src/Editor/ShareCheck.cs
@@ -328,7 +328,7 @@ static void Run(ShareReport r, string ff, string path, ShareExpect e)
string col = p.Color ?? "";
bool tagged = col.Contains("tv") && col.Contains("bt709/bt709/iec61966-2-1");
bool sited = !e.CentredChroma || sps.ChromaLoc == 1;
- Add(r, NameColor, tagged && sited, !tagged ? I18n.T("sin las etiquetas BT.709 (", "without the BT.709 tags (") + (col.Length == 0 ? I18n.T("ninguna", "none") : col) + ")" :
+ Add(r, NameColor, tagged && sited, !tagged ? I18n.T("sin las etiquetas BT.709 (", "without the BT.709 tags (") + (col.Length == 0 ? I18n.T("ninguna", "none", "keine") : col) + ")" :
!sited ? I18n.T("BT.709, pero no dice que el croma va centrado", "BT.709, but it does not say the chroma is centered") :
I18n.T("BT.709, rango limitado", "BT.709, limited range") + (e.CentredChroma ? I18n.T(", croma centrado", ", centered chroma") : ""));
}
diff --git a/src/Home/FocusClock.cs b/src/Home/FocusClock.cs
index 8efb673..b8d708c 100644
--- a/src/Home/FocusClock.cs
+++ b/src/Home/FocusClock.cs
@@ -119,10 +119,10 @@ public static string Clock(TimeSpan t)
return s >= 3600 ? (s / 3600) + ":" + (s / 60 % 60).ToString("00") + ":" + (s % 60).ToString("00") : (s / 60) + ":" + (s % 60).ToString("00");
}
- // "25 min", "1 h 15 min" ("25분", "1시간 15분" in Korean, which has its own units).
+ // "25 min", "1 h 15 min" ("25분", "1시간 15분" in Korean and "25 Min." in German, which have their own units).
public static string Minutes(int m)
{
- if (I18n.IsKorean)
+ if (I18n.IsKorean || I18n.IsGerman)
return m < 60 ? I18n.Fmt("", "{0} min", m) : I18n.Fmt("", "{0} h", m / 60) + (m % 60 > 0 ? " " + I18n.Fmt("", "{0} min", m % 60) : "");
return m < 60 ? m + " min" : (m / 60) + " h" + (m % 60 > 0 ? " " + (m % 60) + " min" : "");
}
diff --git a/src/Home/HomeBackdrop.cs b/src/Home/HomeBackdrop.cs
index 7604add..fceef00 100644
--- a/src/Home/HomeBackdrop.cs
+++ b/src/Home/HomeBackdrop.cs
@@ -75,7 +75,7 @@ void BuildEditor()
{ SubNow = delegate { return radTuned() ? Tuned : null; }, Loose = radTuned },
new ToggleRow(I18n.T("Sombra", "Shadow"), null, null, D.Color.Empty, D.Color.Empty,
delegate { return settings.BgShadow; }, delegate(bool v) { settings.BgShadow = v; StyleChanged(); }),
- new SegRow(I18n.T("Proporci\u00F3n", "Aspect ratio"), null, null, D.Color.Empty, D.Color.Empty, new string[] { "Auto", "16:9", "4:3", "1:1" },
+ new SegRow(I18n.T("Proporci\u00F3n", "Aspect ratio"), null, null, D.Color.Empty, D.Color.Empty, new string[] { I18n.T("Auto", "Auto", "Auto"), "16:9", "4:3", "1:1" },
delegate { return Math.Max(0, Array.IndexOf(ratios, settings.BgRatio)); }, delegate(int i) { settings.BgRatio = ratios[i]; StyleChanged(); }));
styleNote = Paragraph("", 12, pal.Label2);
styleNote.Margin = new Thickness(8, -14, 8, 24);
diff --git a/src/Home/HomeHistoryPage.cs b/src/Home/HomeHistoryPage.cs
index 7d8e7c2..41a3913 100644
--- a/src/Home/HomeHistoryPage.cs
+++ b/src/Home/HomeHistoryPage.cs
@@ -145,7 +145,7 @@ FrameworkElement HistorySearchField()
hint.IsHitTestVisible = false;
hint.HorizontalAlignment = HorizontalAlignment.Left;
g.Children.Add(hint);
- TextBlock keys = Label("Ctrl+F", Ds.Regular, 11.5, pal.Label3, new Thickness(0, 0, 13, 1));
+ TextBlock keys = Label(Hotkeys.CtrlF, Ds.Regular, 11.5, pal.Label3, new Thickness(0, 0, 13, 1));
keys.IsHitTestVisible = false;
keys.HorizontalAlignment = HorizontalAlignment.Right;
g.Children.Add(keys);
diff --git a/src/Home/HomePages.cs b/src/Home/HomePages.cs
index 63a1348..4ecef15 100644
--- a/src/Home/HomePages.cs
+++ b/src/Home/HomePages.cs
@@ -613,8 +613,8 @@ public void Take(HomeWindow w, WF.Keys keyData)
if (others.RemoveAll(delegate(string o) { return Hotkeys.Same(o, combo); }) == 0) continue;
w.settings.SetHotkeys(a, string.Join(", ", others.ToArray()));
w.keysMoved = I18n.IsKorean ? (others.Count == 0
- ? string.Format(I18n.Localize("{0} was assigned to {1}, which now has no shortcut."), Hotkeys.DisplayOne(combo), ActionNames[i])
- : string.Format(I18n.Localize("{0} moved from {1} to {2}."), Hotkeys.DisplayOne(combo), ActionNames[i], Title))
+ ? I18n.KoreanFormat(I18n.Localize("{0} was assigned to {1}, which now has no shortcut."), Hotkeys.DisplayOne(combo), ActionNames[i])
+ : I18n.KoreanFormat(I18n.Localize("{0} moved from {1} to {2}."), Hotkeys.DisplayOne(combo), ActionNames[i], Title))
: Hotkeys.DisplayOne(combo) + " " + I18n.Fmt("era de \u00AB{0}\u00BB", "was assigned to \u201C{0}\u201D", ActionNames[i]) +
(others.Count == 0 ? I18n.T(", que se ha quedado sin atajo.", ", which now has no shortcut.")
: I18n.Fmt("; ahora es de \u00AB{0}\u00BB.", "; it now belongs to \u201C{0}\u201D.", Title));
@@ -895,7 +895,7 @@ void BuildGeneral()
delegate { int i = Array.IndexOf(Settings.TuckSeconds, settings.StackTuck); return i < 0 ? 2 : i; },
delegate(int i) { settings.StackTuck = Settings.TuckSeconds[Math.Max(0, Math.Min(Settings.TuckSeconds.Length - 1, i))]; owner.Untuck(); }),
new SegRow(I18n.T("Captura con temporizador", "Countdown timer"), I18n.T("Eliges el \u00E1rea y cuenta atr\u00E1s antes de capturar: da tiempo a abrir un men\u00FA o un aviso. Esc la cancela.", "Select area and counts down before capture: gives time to open menus. Esc cancels."), "clock", Mac.Orange, Mac.Red,
- new string[] { "3 s", "5 s", "10 s" },
+ new string[] { RecordSetup.Seconds(3), RecordSetup.Seconds(5), RecordSetup.Seconds(10) },
delegate { return settings.CaptureDelay == 10 ? 2 : settings.CaptureDelay == 5 ? 1 : 0; },
delegate(int i) { settings.CaptureDelay = i == 2 ? 10 : i == 1 ? 5 : 3; }),
new ToggleRow(I18n.T("Seguir al rat\u00F3n entre pantallas", "Follow cursor across monitors"), I18n.T("Con varias pantallas, las miniaturas van a la del rat\u00F3n.", "On multi-monitor setups, thumbnails appear on the active screen."), "screen", Mac.Indigo, Mac.Purple,
diff --git a/src/Home/HomeRecordPage.cs b/src/Home/HomeRecordPage.cs
index 411c3e5..09e66e6 100644
--- a/src/Home/HomeRecordPage.cs
+++ b/src/Home/HomeRecordPage.cs
@@ -1047,7 +1047,7 @@ void RecBefore()
Grid.SetRow(l2, 1);
inner.Children.Add(l2);
int[] cds = RecordSetup.Countdowns;
- MacSegmented cd = new MacSegmented(new string[] { I18n.T("No", "Off", "Aus"), "3 s", "5 s", "10 s" }, Math.Max(0, Array.IndexOf(cds, Settings.Countdown(settings.RecordCountdown))));
+ MacSegmented cd = new MacSegmented(new string[] { I18n.T("No", "Off", "Aus"), RecordSetup.Seconds(3), RecordSetup.Seconds(5), RecordSetup.Seconds(10) }, Math.Max(0, Array.IndexOf(cds, Settings.Countdown(settings.RecordCountdown))));
cd.Margin = new Thickness(0, 12, 0, 0);
Access.Describe(cd, l2.Text, null);
cd.Changed += delegate(int i) { settings.RecordCountdown = cds[i]; Changed(); };
diff --git a/src/Home/HomeSearch.cs b/src/Home/HomeSearch.cs
index 65064b5..690c6ac 100644
--- a/src/Home/HomeSearch.cs
+++ b/src/Home/HomeSearch.cs
@@ -74,7 +74,7 @@ FrameworkElement SearchField()
MaxLength = 80, VerticalContentAlignment = VerticalAlignment.Center, Template = DockFieldTemplate(), Text = searchText
};
AutomationProperties.SetName(box, I18n.T("Buscar ajustes", "Search settings"));
- AutomationProperties.SetHelpText(box, "Ctrl+F");
+ AutomationProperties.SetHelpText(box, Hotkeys.CtrlF);
g.Children.Add(box);
Border clear = new TapBorder
{
diff --git a/src/Home/HomeSearchIndex.cs b/src/Home/HomeSearchIndex.cs
index c6237cf..b9771f9 100644
--- a/src/Home/HomeSearchIndex.cs
+++ b/src/Home/HomeSearchIndex.cs
@@ -46,37 +46,40 @@ internal static class SettingsSearch
// Words that find each other: whoever types one of a group means the setting that says another (folded).
internal static readonly string[][] Synonyms =
{
- new string[] { "atajo", "tecla", "combinacion", "shortcut", "\ub2e8\ucd95\ud0a4", "\ud0a4\uc870\ud569", "kurzbefehl", "tastenkombination" },
- new string[] { "carpeta", "guardar", "directorio", "ruta", "\ud3f4\ub354", "\uc800\uc7a5", "\uacbd\ub85c", "ordner", "ablage" },
+ new string[] { "atajo", "tecla", "combinacion", "shortcut", "\ub2e8\ucd95\ud0a4", "\ud0a4\uc870\ud569", "kurzbefehl", "tastenkombination", "tastenkurzel", "hotkey", "hotkeys", "keyboard shortcut" },
+ new string[] { "carpeta", "guardar", "directorio", "ruta", "\ud3f4\ub354", "\uc800\uc7a5", "\uacbd\ub85c", "ordner", "ablage", "folder" },
new string[] { "micro", "microfono", "voz", "\ub9c8\uc774\ud06c", "\uc74c\uc131", "mikrofon" },
- new string[] { "sonido", "audio", "volumen", "\uc18c\ub9ac", "\uc624\ub514\uc624", "\uc74c\ub7c9", "\ubcfc\ub968", "ton", "lautstaerke" },
+ new string[] { "sonido", "audio", "volumen", "\uc18c\ub9ac", "\uc624\ub514\uc624", "\uc74c\ub7c9", "\ubcfc\ub968", "ton", "lautstaerke", "lautstarke" },
new string[] { "puntero", "raton", "cursor", "\ud3ec\uc778\ud130", "\ub9c8\uc6b0\uc2a4", "\ucee4\uc11c", "maus", "zeiger" },
- new string[] { "privacidad", "datos sensibles", "tapar", "ocultar", "\uac1c\uc778\uc815\ubcf4", "\uac00\ub9ac\uae30", "\ubbfc\uac10", "datenschutz", "schwärzen" },
- new string[] { "tema", "oscuro", "claro", "apariencia", "\ud14c\ub9c8", "\uc5b4\ub461\uac8c", "\ubc1d\uac8c", "\ubaa8\uc591", "design", "dunkel", "hell" },
+ new string[] { "privacidad", "datos sensibles", "tapar", "ocultar", "\uac1c\uc778\uc815\ubcf4", "\uac00\ub9ac\uae30", "\ubbfc\uac10", "datenschutz", "schwarzen", "privacy", "private", "sensitive", "redact" },
+ new string[] { "tema", "oscuro", "claro", "apariencia", "\ud14c\ub9c8", "\uc5b4\ub461\uac8c", "\ubc1d\uac8c", "\ubaa8\uc591", "design", "dunkel", "hell", "dark", "light", "\ub2e4\ud06c", "\ub77c\uc774\ud2b8" },
new string[] { "actualizar", "actualizacion", "version", "\uc5c5\ub370\uc774\ud2b8", "\ubc84\uc804", "update", "aktualisieren" },
- new string[] { "captura", "pantallazo", "screenshot", "\ucea1\ucc98", "\uc2a4\ud06c\ub9b0\uc0f7", "\uac08\ubb34\ub9ac", "bildschirmfoto" },
+ new string[] { "captura", "pantallazo", "screenshot", "\ucea1\ucc98", "\uc2a4\ud06c\ub9b0\uc0f7", "\uac08\ubb34\ub9ac", "bildschirmfoto", "capture", "captures" },
new string[] { "video", "grabar", "grabacion", "\ub3d9\uc601\uc0c1", "\ub179\ud654", "aufnahme" },
+ new string[] { "windows", "\uc708\ub3c4\uc6b0", "\uc708\ub3c4" },
new string[] { "arranque", "iniciar", "encender", "\uc2dc\uc791", "\uc790\ub3d9\uc2e4\ud589", "autostart", "starten" },
new string[] { "camara", "webcam", "\uce74\uba54\ub77c", "\uc6f9\ucea0", "kamera" },
- new string[] { "copiar", "portapapeles", "pegar", "\ubcf5\uc0ac", "\ud074\ub9bd\ubcf4\ub4dc", "\ubd99\uc5ec\ub123\uae30", "kopieren", "zwischenablage", "einfügen" },
- new string[] { "borrar", "eliminar", "limpiar", "\uc0ad\uc81c", "\uc81c\uac70", "\ube44\uc6b0\uae30", "löschen", "entfernen" },
+ new string[] { "copiar", "portapapeles", "pegar", "\ubcf5\uc0ac", "\ud074\ub9bd\ubcf4\ub4dc", "\ubd99\uc5ec\ub123\uae30", "kopieren", "zwischenablage", "einfugen" },
+ new string[] { "borrar", "eliminar", "limpiar", "\uc0ad\uc81c", "\uc81c\uac70", "\ube44\uc6b0\uae30", "loschen", "entfernen", "delete", "remove", "erase", "clear" },
new string[] { "fotogramas", "fps", "\ud504\ub808\uc784", "bilder" },
new string[] { "nombre", "archivo", "fichero", "\uc774\ub984", "\ud30c\uc77c", "datei", "bezeichnung" },
new string[] { "reloj", "fitbit", "watch", "pulsera", "pasos", "sueno", "\uc6cc\uce58", "\uac78\uc74c", "\uc218\uba74", "uhr", "schritte", "schlaf" },
new string[] { "acceso", "enlace", "favorito", "web", "url", "\ubc14\ub85c\uac00\uae30", "\ub9c1\ud06c", "\uc990\uaca8\ucc3e\uae30", "link", "lesezeichen" },
- new string[] { "completa", "virtual", "remoto", "presentacion", "\uc804\uccb4\ud654\uba74", "\uc6d0\uaca9", "\ubc1c\ud45c", "vollbild", "präsentation" },
- new string[] { "resumen", "hora", "\uc694\uc57d", "\uc2dc\uac01", "übersicht", "uhrzeit" },
+ new string[] { "completa", "virtual", "remoto", "presentacion", "\uc804\uccb4\ud654\uba74", "\uc6d0\uaca9", "\ubc1c\ud45c", "vollbild", "prasentation" },
+ new string[] { "resumen", "hora", "\uc694\uc57d", "\uc2dc\uac01", "ubersicht", "uhrzeit" },
new string[] { "nota", "apunte", "apuntar", "\uba54\ubaa8", "\ub178\ud2b8", "notiz", "vermerk" }
};
// Left out of a search with other words: "carpeta de capturas" needs no "de" in the row, "modo oscuro" or
// "activar micro" no "modo" or "activar".
- static readonly string[] StopWords =
+ internal static readonly string[] StopWords =
{
"a", "al", "con", "de", "del", "el", "en", "la", "las", "lo", "los", "mi", "mis", "o", "para", "por", "que", "se", "tu", "tus", "u", "un", "una", "y",
"activar", "desactivar", "ajuste", "ajustes", "cambiar", "como", "configurar", "configuracion", "modo", "opcion", "opciones",
- "der", "die", "das", "und", "ein", "eine", "ich", "mich", "mir", "mit", "für", "von", "vom", "zu", "zum", "zur", "auf", "aus", "beim", "im", "in",
- "ist", "sind", "wie", "was", "wenn", "oder", "aktivieren", "deaktivieren", "einstellung", "einstellungen", "ändern"
+ "der", "die", "das", "und", "ein", "eine", "ich", "mich", "mir", "mit", "fur", "von", "vom", "zu", "zum", "zur", "auf", "aus", "beim", "im", "in",
+ "ist", "sind", "wie", "was", "wenn", "oder", "aktivieren", "deaktivieren", "einstellung", "einstellungen", "andern",
+ "change", "enable", "disable", "turn", "set", "setting", "settings", "option", "options", "mode", "the", "of", "to", "for", "my", "your",
+ "\ubcc0\uacbd", "\uc124\uc815", "\ubaa8\ub4dc", "\ucf1c\uae30", "\ub044\uae30", "\uc0ac\uc6a9"
};
// A synonym counts half: a row that says the word itself, even inside a longer one, comes before one that only
diff --git a/src/Home/LanguagePicker.cs b/src/Home/LanguagePicker.cs
index cab80b3..36a1cdc 100644
--- a/src/Home/LanguagePicker.cs
+++ b/src/Home/LanguagePicker.cs
@@ -40,7 +40,7 @@ internal static void Apply(Settings settings, string code)
internal static string DisplayName(string code)
{
- I18n.LanguageOption option = I18n.FindLanguage(code) ?? I18n.FindLanguage("auto");
+ I18n.LanguageOption option = I18n.FindListedLanguage(code) ?? I18n.FindLanguage("auto");
return option.Name;
}
diff --git a/src/Home/MascotParts.cs b/src/Home/MascotParts.cs
index b4ea9f7..9d9c1c5 100644
--- a/src/Home/MascotParts.cs
+++ b/src/Home/MascotParts.cs
@@ -114,7 +114,7 @@ public static partial class MascotParts
"Emperor penguin", "Rag disguise", "Aura warrior", "Cuddly dragon", "Copycat blob", "Genetic clone",
"Baby tree", "Smiling titan", "Goofy titan" };
static readonly string[] KindsDe = { "Roboter", "Katze", "Häschen", "Geist", "Schleim", "Drache", "Hund", "Chibi", "Pinguin", "Panda", "Fuchs", "Frosch", "Rentier", "Flügellöwe",
- "Nachtfurie", "Lichtfurie", "Todesnadder", "Monströser Nightmare", "Gronckle",
+ "Nachtfurie", "Lichtfurie", "Todesnadder", "Monströser Nightmare", "Gronckel",
"Blaues Experiment", "Rosa Wollknäuel", "Kleiner Jedi", "Flauschi", "Salamander", "Elektromaus",
"Konsole", "Kosmische Katze", "Waldgeist",
"Samen", "Schildkrötlein", "Singballon", "Schlafmütze", "Schelmischer Schatten", "Psy-Kätzchen",
diff --git a/src/Home/MascotTalk.cs b/src/Home/MascotTalk.cs
index 3264e35..3e45e0e 100644
--- a/src/Home/MascotTalk.cs
+++ b/src/Home/MascotTalk.cs
@@ -323,7 +323,7 @@ public static string Remind(Settings s, int kind, int minutes)
{
if (I18n.IsKorean)
{
- string tEn = string.Format(I18n.Localize("{0} minutes"), minutes);
+ string tEn = FocusClock.Minutes(minutes);
switch (kind)
{
case WellKind.Water:
@@ -380,7 +380,7 @@ public static string Remind(Settings s, int kind, int minutes)
I18n.T("Tus ojos piden vacaciones. Veinte segundos.", "Your eyes are begging for a vacation. Twenty seconds.", "Deine Augen flehen um Urlaub. Zwanzig Sekunden.") });
case WellKind.Move:
return By(s.MascotPersonality,
- new string[] { I18n.T("\u00A1Arriba! Llevas " + t + " en la silla. \u00A1Estiramos las piernas!", "Up! You've been in that chair for " + t + ". Let's stretch those legs!", "Auf! Du sitzt schon " + t + " in dem Stuhl. Strecken wir die Beine!"),
+ new string[] { I18n.T("\u00A1Arriba! Llevas " + t + " en la silla. \u00A1Estiramos las piernas!", "Up! You've been in that chair for " + t + ". Let's stretch those legs!", "Auf! Du sitzt schon " + t + " auf dem Stuhl. Strecken wir die Beine!"),
I18n.T("\u00A1Hora de moverse! Lev\u00E1ntate un momento.", "Time to move! Stand up for a moment.", "Zeit, dich zu bewegen! Steh kurz auf."),
I18n.T("\u00BFDamos un pase\u00EDto? Tus piernas lo piden.", "Short walk? Your legs are asking for it.", "Kurzer Spaziergang? Deine Beine betteln darum.") },
new string[] { I18n.T("Lev\u00E1ntate y estira un poco el cuerpo.", "Stand up and stretch your body a bit.", "Steh auf und streck dich ein bisschen."),
@@ -550,13 +550,15 @@ public static string Climb(Settings s)
new string[] { I18n.T("Ahora soy el rey de la ventana.", "Now I'm the king of the window.", "Jetzt bin ich der K\u00F6nig des Fensters."), I18n.T("Qu\u00E9 desorden hay aqu\u00ED abajo.", "Such a mess down there.", "Was ist da unten ein Durcheinander."), I18n.T("Esta ventana es m\u00EDa.", "This window is mine.", "Dieses Fenster geh\u00F6rt mir.") });
}
+ static readonly string[] LevelNamesInASentenceDe = { "Neulinge", "Kumpels", "Freunde", "beste Freunde", "unzertrennlich", "eine Legende" };
+
public static string LevelUp(Settings s, int level)
{
if (I18n.IsKorean) return string.Format(I18n.Localize("We are now {0}!"), MascotParts.LevelNames[level]);
string lower = MascotParts.LevelNames[level].ToLowerInvariant();
return I18n.T("\u00A1Ya somos " + lower + "!",
"We are now " + lower + "!",
- "Jetzt sind wir " + MascotParts.LevelNames[level] + "!");
+ "Jetzt sind wir " + LevelNamesInASentenceDe[level] + "!");
}
}
}
diff --git a/src/Home/Wellness.cs b/src/Home/Wellness.cs
index e96f56e..872b69a 100644
--- a/src/Home/Wellness.cs
+++ b/src/Home/Wellness.cs
@@ -19,8 +19,8 @@ public static string[] MinuteNames
{
get
{
- // Korean says its own units ("20\uBD84", "1\uC2DC\uAC04 30\uBD84"), as everywhere else a duration is shown.
- if (I18n.IsKorean) return new string[] { I18n.T("No", "Off"), FocusClock.Minutes(20), FocusClock.Minutes(30), FocusClock.Minutes(45), FocusClock.Minutes(60), FocusClock.Minutes(90), FocusClock.Minutes(120) };
+ // Korean and German say their own units ("20\uBD84", "1\uC2DC\uAC04 30\uBD84", "20 Min."), as everywhere else a duration is shown.
+ if (I18n.IsKorean || I18n.IsGerman) return new string[] { I18n.T("No", "Off"), FocusClock.Minutes(20), FocusClock.Minutes(30), FocusClock.Minutes(45), FocusClock.Minutes(60), FocusClock.Minutes(90), FocusClock.Minutes(120) };
return new string[] { I18n.T("No", "Off"), "20 min", "30 min", "45 min", "1 h", "1 h 30", "2 h" };
}
}
diff --git a/src/I18n.German.App.cs b/src/I18n.German.App.cs
index 16c26d2..f67bc44 100644
--- a/src/I18n.German.App.cs
+++ b/src/I18n.German.App.cs
@@ -66,10 +66,10 @@ static void RegisterGermanApp(Action reg)
reg("in the \u201Crecuperado\u201D folder.", "en la carpeta \u00ABrecuperado\u00BB.", "im Ordner \u201Erecuperado\u201C.");
reg("Windows cannot write to {0}. Check folder permissions or if Controlled Folder Access is protecting it.",
"Windows no deja escribir en {0}. Comprueba los permisos de la carpeta o si \u00ABAcceso controlado a carpetas\u00BB la protege.",
- "Windows kann nicht in {0} schreiben. Pr\u00FCfe die Ordnerberechtigungen oder ob der \u201Ekontrollierte Ordnerzugriff\u201C sie sch\u00FCtzt.");
- reg("No space left on the disk of {0}. Free up space and try again.", "No queda espacio en el disco de {0}. Libera espacio y vuelve a intentarlo.", "Auf dem Laufwerk von {0} ist kein Platz mehr. Schaffe Platz und versuch es erneut.");
- reg("Cannot find folder {0} (a disconnected or network drive?).", "No se encuentra la carpeta {0} (\u00BFuna unidad desconectada o de red?).", "Ordner {0} wurde nicht gefunden (ein getrenntes oder Netzlaufwerk?).");
- reg("the folder", "la carpeta", "dem Ordner");
+ "Windows kann nicht in {0} schreiben. Pr\u00FCfe die Ordnerberechtigungen oder ob der \u201Ekontrollierte Ordnerzugriff\u201C ihn sch\u00FCtzt.");
+ reg("No space left on the disk of {0}. Free up space and try again.", "No queda espacio en el disco de {0}. Libera espacio y vuelve a intentarlo.", "Auf dem Laufwerk f\u00FCr {0} ist kein Platz mehr. Schaffe Platz und versuch es erneut.");
+ reg("Cannot find the folder (a disconnected or network drive?).", "No se encuentra la carpeta (\u00BFuna unidad desconectada o de red?).", "Der Ordner wurde nicht gefunden (ein getrenntes oder Netzlaufwerk?).");
+ reg("Cannot find folder {0} (a disconnected or network drive?).", "No se encuentra la carpeta {0} (\u00BFuna unidad desconectada o de red?).", "{0} wurde nicht gefunden (ein getrenntes oder Netzlaufwerk?).");
reg("Opening {0}. {1} {2} (the viewer shows one at a time).", "Se abre {0}. {1} {2} (el visor muestra uno cada vez).", "{0} wird ge\u00F6ffnet. {1} {2} (die Ansicht zeigt immer nur eine).");
reg("more file", "archivo m\u00E1s", "weitere Datei");
reg("more files", "archivos m\u00E1s", "weitere Dateien");
diff --git a/src/I18n.German.Capture.cs b/src/I18n.German.Capture.cs
index 32415a9..13b74bc 100644
--- a/src/I18n.German.Capture.cs
+++ b/src/I18n.German.Capture.cs
@@ -81,7 +81,7 @@ static void RegisterGermanCapture(Action reg)
reg("The capture stopped before finishing: what was captured so far has been saved.", null, "Die Aufnahme endete vorzeitig. Der bisher aufgenommene Teil wurde gespeichert.");
reg("Could not compose the image: it is too large for available memory. Try a narrower or shorter area.", null, "Das Bild ist zu groß für den verfügbaren Arbeitsspeicher. Wähle einen schmaleren oder kürzeren Bereich.");
reg("Could not finish capture. Please try again.", null, "Die Aufnahme konnte nicht abgeschlossen werden. Versuch es erneut.");
- reg("The area did not scroll, so it was saved as a normal capture. Choose only the part that scrolls (the list or text), without the fixed header.", null, "Der Bereich wurde als normale Aufnahme gespeichert, weil er sich nicht bewegt hat. Wähle nur die scrollbare Liste oder den Textbereich ohne festen Kopfbereich.");
+ reg("The area did not scroll, so it was saved as a normal capture. Choose only the part that scrolls (the list or text), without the fixed header.", null, "Der Bereich hat sich nicht bewegt und wurde als normale Aufnahme gespeichert. Wähle nur den scrollbaren Teil, ohne festen Kopfbereich.");
reg("Composing…", null, "Bild wird zusammengesetzt…");
reg("Esc again to discard", null, "Zum Verwerfen erneut Esc drücken");
reg("You haven't scrolled · Done again saves it", null, "Nichts gescrollt · Erneut „Fertig“ speichert");
diff --git a/src/I18n.German.Editor.cs b/src/I18n.German.Editor.cs
index b5e7fa7..ea9364f 100644
--- a/src/I18n.German.Editor.cs
+++ b/src/I18n.German.Editor.cs
@@ -247,7 +247,7 @@ static void RegisterGermanEditor(Action reg)
reg("Export quality: ", null, "Exportqualität: ");
reg(" (email)", null, " (E-Mail)");
reg("FAIL ", null, "FEHLER ");
- reg("none", null, "keine");
+ reg("none", null, "Keine");
reg(" %", null, " %");
reg("Clip is {0} long: such a long GIF has a large file size and takes time to create. For such a clip, “Export clip” (MP4) is usually better.\n\nCreate GIF anyway?", null, "Der Ausschnitt dauert {0}: Ein so langes GIF wird sehr groß und braucht lange. Für so einen Ausschnitt passt meist „Ausschnitt exportieren“ (MP4) besser.\n\nGIF trotzdem erstellen?");
reg("Arrows: frame by frame. Shift and arrows: second by second. Home and End: start and end of the trim.", null, "Pfeile: Einzelbild für Einzelbild. Umschalt und Pfeile: sekundenweise. Pos1 und Ende: Anfang und Ende des Zuschnitts.");
diff --git a/src/I18n.German.Home.cs b/src/I18n.German.Home.cs
index c86a11f..00b46cd 100644
--- a/src/I18n.German.Home.cs
+++ b/src/I18n.German.Home.cs
@@ -175,7 +175,7 @@ static void RegisterGermanHome(Action reg)
reg("Downloaded, verified, and installed when system is idle.", "Se descargan, se comprueba su firma y se instalan cuando no est\u00E9s usando el equipo.", "Wird heruntergeladen, gepr\u00FCft und installiert, wenn der PC im Leerlauf ist.");
reg("{0}% \u00B7 SHA-256 checksum and signature verified after", "{0} % \u00B7 despu\u00E9s se comprueban su suma SHA-256 y su firma", "{0} % \u00B7 danach werden SHA-256-Pr\u00FCfsumme und Signatur gepr\u00FCft");
reg("just now", "ahora mismo", "gerade eben");
- reg("{0} min ago", "hace {0} min", "vor {0} Min.");
+ reg("{0} min ago", "hace {0} min", "vor {0} min");
reg("today at {0}", "hoy a las {0}", "heute um {0}");
reg("yesterday at {0}", "ayer a las {0}", "gestern um {0}");
reg("on {0} at {1}", "el {0} a las {1}", "am {0} um {1}");
diff --git a/src/I18n.Korean.Capture.cs b/src/I18n.Korean.Capture.cs
index 7e304e0..31c40d5 100644
--- a/src/I18n.Korean.Capture.cs
+++ b/src/I18n.Korean.Capture.cs
@@ -211,7 +211,7 @@ static void RegisterKoreanCapture(Dictionary map)
map["Recording resumed from \u201C{0}\u201D."] = "\u2018{0}\u2019\uC5D0\uC11C \uB179\uC74C\uC744 \uC7AC\uAC1C\uD588\uC2B5\uB2C8\uB2E4.";
map["Selected audio output is unavailable"] = "\uC120\uD0DD\uD55C \uC624\uB514\uC624 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C";
map["Selected microphone disconnected"] = "\uC120\uD0DD\uD55C \uB9C8\uC774\uD06C \uC5F0\uACB0 \uB04A\uAE40";
- map["Recording with \u201C{0}\u201D, default Windows device, until it returns."] = "\uC7A5\uCE58\uAC00 \uB2E4\uC2DC \uC5F0\uACB0\uB420 \uB54C\uAE4C\uC9C0 Windows \uAE30\uBCF8 \uC7A5\uCE58 \u2018{0}\u2019\uB85C \uB179\uC74C\uD569\uB2C8\uB2E4.";
+ map["Recording with \u201C{0}\u201D, default Windows device, until it returns."] = "\uC7A5\uCE58\uAC00 \uB2E4\uC2DC \uC5F0\uACB0\uB420 \uB54C\uAE4C\uC9C0 Windows \uAE30\uBCF8 \uC7A5\uCE58 \u2018{0}\u2019(\uC73C)\uB85C \uB179\uC74C\uD569\uB2C8\uB2E4.";
map["No system audio"] = "\uC2DC\uC2A4\uD15C \uC18C\uB9AC \uC5C6\uC74C";
map["No device available: this part will record without {0}."] = "\uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uC7A5\uCE58\uAC00 \uC5C6\uC5B4 \uC774 \uAD6C\uAC04\uC740 {0} \uC5C6\uC774 \uB179\uD654\uD569\uB2C8\uB2E4.";
map["FFmpeg closed during the recording. "] = "\uB179\uD654 \uC911 FFmpeg\uAC00 \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ";
@@ -448,6 +448,19 @@ static void RegisterKoreanCapture(Dictionary map)
map["Check: passed, {0} frames identical to the ones sent to the encoder."] = "\uAC80\uC99D \uD1B5\uACFC: \uC778\uCF54\uB354\uB85C \uBCF4\uB0B8 \uD504\uB808\uC784 {0}\uAC1C\uAC00 \uBAA8\uB450 \uC77C\uCE58\uD569\uB2C8\uB2E4.";
map["Check: FAILED."] = "\uAC80\uC99D \uC2E4\uD328.";
+ map["Volume Down"] = "\uBCFC\uB968 \uC791\uAC8C";
+ map["Volume Up"] = "\uBCFC\uB968 \uD06C\uAC8C";
+ map["Play/Pause"] = "\uC7AC\uC0DD/\uC77C\uC2DC \uC815\uC9C0";
+ map["Next Track"] = "\uB2E4\uC74C \uD2B8\uB799";
+ map["Previous Track"] = "\uC774\uC804 \uD2B8\uB799";
+ map["Stop loading"] = "\uB85C\uB529 \uC911\uC9C0";
+ map["Browser Home"] = "\uBE0C\uB77C\uC6B0\uC800 \uD648";
+ map["Mail"] = "\uBA54\uC77C";
+ map["App 1"] = "\uC571 1";
+ map["Calculator"] = "\uACC4\uC0B0\uAE30";
+ map["Media"] = "\uBBF8\uB514\uC5B4";
+ map["From 0 to 100"] = "0~100";
+
RegisterKoreanEditor(map);
}
}
diff --git a/src/I18n.Korean.Core.cs b/src/I18n.Korean.Core.cs
index b547955..6bf09fb 100644
--- a/src/I18n.Korean.Core.cs
+++ b/src/I18n.Korean.Core.cs
@@ -58,7 +58,7 @@ static void RegisterKoreanCore(Dictionary map)
// Program.cs
map["Could not open {0}.\n\n{1}"] = "{0}\uC744(\uB97C) \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\n{1}";
map["This machine has Stackshot {0} installed via MSI package.\n\nTo update to {1}, install Stackshot.msi for that version (or ask IT)."] = "\uC774 PC\uC5D0\uB294 MSI\uB85C \uC124\uCE58\uD55C Stackshot {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.\n\n{1} \uBC84\uC804\uC758 Stackshot.msi\uB97C \uC124\uCE58\uD558\uAC70\uB098 IT \uB2F4\uB2F9\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694.";
- map["Update Stackshot from version {0} to {1}?"] = "Stackshot\uC744 {0}\uC5D0\uC11C {1}(\uC73C)\uB85C \uC5C5\uB370\uC774\uD2B8\uD560\uAE4C\uC694?";
+ map["Update Stackshot from version {0} to {1}?"] = "Stackshot\uC744 {0} \uBC84\uC804\uC5D0\uC11C {1} \uBC84\uC804\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD560\uAE4C\uC694?";
map["Does not seem to be a valid image, or is corrupted."] = "\uC62C\uBC14\uB978 \uC774\uBBF8\uC9C0\uAC00 \uC544\uB2C8\uAC70\uB098 \uD30C\uC77C\uC774 \uC190\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.";
map["The file cannot be opened in the editor."] = "\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD30C\uC77C\uC744 \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.";
map["Could not install Stackshot.\n\n"] = "Stackshot\uC744 \uC124\uCE58\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\n";
@@ -186,7 +186,7 @@ static void RegisterKoreanCore(Dictionary map)
// Setup.cs
map["Stackshot: screenshots, video and GIF"] = "Stackshot \uCEA1\uCC98 \uBC0F \uB3D9\uC601\uC0C1\u00B7GIF \uB179\uD654";
- map["\n\nRecovered recordings ({0}) remain in {1}."] = "\n\n\uBCF5\uAD6C\uB41C \uB179\uD654 {0}\uAC1C\uB294 {1}\uC5D0 \uBCF4\uAD00\uB429\uB2C8\uB2E4.";
+ map["\n\nRecovered recordings ({0}) remain in {1}."] = "\n\n\uBCF5\uAD6C\uB41C \uB179\uD654({0})\uB294 {1}\uC5D0 \uBCF4\uAD00\uB429\uB2C8\uB2E4.";
map["Uninstall Stackshot?\n\nCaptures saved in {0} will not be deleted.{1}"] = "Stackshot\uC744 \uC81C\uAC70\uD560\uAE4C\uC694?\n\n{0}\uC5D0 \uC800\uC7A5\uB41C \uCEA1\uCC98\uB294 \uBCF4\uC874\uB429\uB2C8\uB2E4.{1}";
map["Stackshot is still open: there are unsaved changes or a recording is being saved.\n\nClose it and uninstall again."] = "\uC800\uC7A5\uD558\uC9C0 \uC54A\uC740 \uBCC0\uACBD \uC0AC\uD56D\uC774 \uC788\uAC70\uB098 \uB179\uD654\uB97C \uC800\uC7A5 \uC911\uC785\uB2C8\uB2E4.\n\nStackshot\uC744 \uC885\uB8CC\uD55C \uB4A4 \uB2E4\uC2DC \uC81C\uAC70\uD558\uC138\uC694.";
map["Stackshot has been uninstalled. Thank you for trying it!"] = "Stackshot\uC744 \uC81C\uAC70\uD588\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uD574 \uC8FC\uC154\uC11C \uAC10\uC0AC\uD569\uB2C8\uB2E4!";
@@ -262,6 +262,7 @@ static void RegisterKoreanCore(Dictionary map)
map["Windows cannot write to {0}. Check folder permissions or if Controlled Folder Access is protecting it."] = "{0}\uC5D0 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD3F4\uB354 \uAD8C\uD55C\uACFC Windows\uC758 \uC81C\uC5B4\uB41C \uD3F4\uB354 \uC561\uC138\uC2A4 \uC124\uC815\uC744 \uD655\uC778\uD558\uC138\uC694.";
map["No space left on the disk of {0}. Free up space and try again."] = "{0} \uB4DC\uB77C\uC774\uBE0C\uC5D0 \uACF5\uAC04\uC774 \uBD80\uC871\uD569\uB2C8\uB2E4. \uACF5\uAC04\uC744 \uD655\uBCF4\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
map["Another program is using the file. Close it and try again."] = "\uB2E4\uB978 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uB2EB\uACE0 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
+ map["Cannot find the folder (a disconnected or network drive?)."] = "\uD3F4\uB354\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB4DC\uB77C\uC774\uBE0C\uB098 \uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uC138\uC694.";
map["Cannot find folder {0} (a disconnected or network drive?)."] = "{0} \uD3F4\uB354\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB4DC\uB77C\uC774\uBE0C\uB098 \uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uC138\uC694.";
map["The file no longer exists."] = "\uD30C\uC77C\uC774 \uB354 \uC774\uC0C1 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.";
map["The path is too long for Windows. Choose a folder with a shorter path."] = "Windows\uC5D0\uC11C \uCC98\uB9AC\uD558\uAE30\uC5D0 \uACBD\uB85C\uAC00 \uB108\uBB34 \uAE41\uB2C8\uB2E4. \uACBD\uB85C\uAC00 \uB354 \uC9E7\uC740 \uD3F4\uB354\uB97C \uC120\uD0DD\uD558\uC138\uC694.";
@@ -415,7 +416,7 @@ static void RegisterKoreanCore(Dictionary map)
map["Verifying download\u2026"] = "\uB2E4\uC6B4\uB85C\uB4DC \uAC80\uC99D \uC911\u2026";
map["Installing Stackshot {0}"] = "Stackshot {0} \uC124\uCE58 \uC911";
map["Hide"] = "\uC228\uAE30\uAE30";
- map["Could not update to {0}"] = "{0}(\uC73C)\uB85C \uC5C5\uB370\uC774\uD2B8\uD560 \uC218 \uC5C6\uC74C";
+ map["Could not update to {0}"] = "{0} \uBC84\uC804\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD560 \uC218 \uC5C6\uC74C";
map["Stackshot {0} ready to install"] = "Stackshot {0} \uC124\uCE58 \uC900\uBE44 \uC644\uB8CC";
map["Stackshot {0} available"] = "Stackshot {0} \uC0AC\uC6A9 \uAC00\uB2A5";
diff --git a/src/I18n.Korean.HomeDialogue.cs b/src/I18n.Korean.HomeDialogue.cs
index 2d17ed8..1d4d871 100644
--- a/src/I18n.Korean.HomeDialogue.cs
+++ b/src/I18n.Korean.HomeDialogue.cs
@@ -735,7 +735,7 @@ static void RegisterKoreanHomeDialogue(Dictionary map)
map["Example: "] = "\uC608: ";
map["Try different words or fewer letters, such as \u201Cfolder\u201D, \u201Csound\u201D or \u201Cshortcut\u201D."] = "\u2018\uD3F4\uB354\u2019, \u2018\uC18C\uB9AC\u2019, \u2018\uB2E8\uCD95\uD0A4\u2019\uCC98\uB7FC \uB2E4\uB978 \uB2E8\uC5B4\uB098 \uB354 \uC9E7\uC740 \uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694.";
map["{0} was assigned to {1}, which now has no shortcut."] = "{0} \uD0A4\uB97C \uC0AC\uC6A9\uD558\uB358 \u2018{1}\u2019\uC5D0 \uB2E8\uCD95\uD0A4\uAC00 \uB0A8\uC544 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.";
- map["{0} moved from {1} to {2}."] = "{0} \uD0A4 \uD560\uB2F9\uC744 \u2018{1}\u2019\uC5D0\uC11C \u2018{2}\u2019\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.";
+ map["{0} moved from {1} to {2}."] = "{0} \uD0A4 \uD560\uB2F9\uC744 \u2018{1}\u2019\uC5D0\uC11C \u2018{2}\u2019(\uC73C)\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.";
map["{0} \u00B7 {1} captures together"] = "{0} \u00B7 \uD568\uAED8 \uCEA1\uCC98\uD55C \uD69F\uC218 {1}\uD68C";
map[" \u00B7 {0} left until {1}"] = " \u00B7 \u2018{1}\u2019\uAE4C\uC9C0 {0}\uD68C";
map[" \u00B7 max level"] = " \u00B7 \uCD5C\uACE0 \uB808\uBCA8";
@@ -772,7 +772,7 @@ static void RegisterKoreanHomeDialogue(Dictionary map)
map["Got it! No more {0} today."] = "\uC54C\uACA0\uC5B4! \uC624\uB298\uC740 {0}\uC744(\uB97C) \uADF8\uB9CC\uD560\uAC8C.";
map["Alright, no more {0} for today."] = "\uC88B\uC544, \uC624\uB298\uC740 {0}\uC744(\uB97C) \uAEBC \uB458\uAC8C.";
map["Fine, you're off the hook for {0} today."] = "\uC88B\uC544. \uC624\uB298\uC740 {0}\uC744(\uB97C) \uB354 \uC548 \uD574\uB3C4 \uB3FC.";
- map["We are now {0}!"] = "\uC774\uC81C \uC6B0\uB9AC\uB294 \u2018{0}\u2019\uC57C!";
+ map["We are now {0}!"] = "\uC6B0\uB9AC \uC0AC\uC774\uAC00 \u2018{0}\u2019 \uB2E8\uACC4\uAC00 \uB410\uC5B4!";
map["Press {0} to capture."] = "{0} \uD0A4\uB97C \uB20C\uB7EC \uCEA1\uCC98\uD558\uC138\uC694.";
map["Today: {0} glasses of water, {1} eye rests, {2} movement breaks"] = "\uC624\uB298 \uBB3C {0}\uC794, \uB208 \uC26C\uAE30 {1}\uD68C, \uBAB8 \uC6C0\uC9C1\uC774\uAE30 {2}\uD68C";
map[", {0} breathing breaks."] = ", \uD638\uD761 \uC6B4\uB3D9 {0}\uD68C.";
diff --git a/src/I18n.Korean.HomeSettings.cs b/src/I18n.Korean.HomeSettings.cs
index 89068c3..5ea963d 100644
--- a/src/I18n.Korean.HomeSettings.cs
+++ b/src/I18n.Korean.HomeSettings.cs
@@ -33,7 +33,7 @@ static void RegisterKoreanHomeSettings(Dictionary map)
map["Connection cancelled"] = "\uC5F0\uACB0 \uCDE8\uC18C\uB428";
map["Nothing was connected. You can close this tab and try again whenever you like from Stackshot."] = "\uC5F0\uACB0\uB41C \uAE30\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uD0ED\uC744 \uB2EB\uACE0 \uC5B8\uC81C\uB4E0\uC9C0 Stackshot\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
map["Could not connect"] = "\uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4";
- map["Google returned \u201C{0}\u201D. Close this tab and try again from Stackshot."] = "Google\uC5D0\uC11C \u201C{0}\u201D\uC744 \uBC18\uD658\uD588\uC2B5\uB2C8\uB2E4. \uD0ED\uC744 \uB2EB\uACE0 Stackshot\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
+ map["Google returned \u201C{0}\u201D. Close this tab and try again from Stackshot."] = "Google\uC5D0\uC11C \u201C{0}\u201D\uC744(\uB97C) \uBC18\uD658\uD588\uC2B5\uB2C8\uB2E4. \uD0ED\uC744 \uB2EB\uACE0 Stackshot\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
map["Google said: {0}"] = "Google \uC751\uB2F5: {0}";
map["Invalid response"] = "\uC798\uBABB\uB41C \uC751\uB2F5";
map["This response is not from the login opened by Stackshot. Try again from the app."] = "Stackshot\uC5D0\uC11C \uC2DC\uC791\uD55C \uB85C\uADF8\uC778\uC5D0 \uB300\uD55C \uC751\uB2F5\uC774 \uC544\uB2D9\uB2C8\uB2E4. \uC571\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.";
@@ -293,7 +293,7 @@ static void RegisterKoreanHomeSettings(Dictionary map)
map["Styles"] = "\uC2A4\uD0C0\uC77C";
map["Favorites"] = "\uC990\uACA8\uCC3E\uAE30";
map["Originals"] = "\uC624\uB9AC\uC9C0\uB110";
- map["Nothing with \u201C{0}\u201D in {1}"] = "{1}\uC5D0\uC11C \u201C{0}\u201D\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4";
+ map["Nothing with \u201C{0}\u201D in {1}"] = "{1}\uC5D0\uC11C \u201C{0}\u201D\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4";
map["See {0} in {1}"] = "{1}\uC5D0\uC11C {0} \uBCF4\uAE30";
map["Try another word"] = "\uB2E4\uB978 \uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694";
map["Character"] = "\uCE90\uB9AD\uD130";
@@ -492,7 +492,7 @@ static void RegisterKoreanHomeSettings(Dictionary map)
map["For images; videos and GIFs retain their own names."] = "\uC774\uBBF8\uC9C0\uC5D0 \uC801\uC6A9\uD569\uB2C8\uB2E4. \uB3D9\uC601\uC0C1\uACFC GIF\uB294 \uC790\uCCB4 \uC774\uB984\uC744 \uC720\uC9C0\uD569\uB2C8\uB2E4.";
map["File names"] = "\uD30C\uC77C \uC774\uB984";
map["Reset"] = "\uCD08\uAE30\uD654";
- map["Reset to {0}"] = "{0}(\uC73C)\uB85C \uCD08\uAE30\uD654";
+ map["Reset to {0}"] = "\uAE30\uBCF8\uAC12\uC73C\uB85C \uCD08\uAE30\uD654: {0}";
map["No"] = "\uC544\uB2C8\uC694";
map["By month"] = "\uC6D4\uBCC4";
map["By year and month"] = "\uC5F0\uB3C4 \uBC0F \uC6D4\uBCC4";
@@ -789,10 +789,10 @@ static void RegisterKoreanHomeSettings(Dictionary map)
map["Click"] = "\uD074\uB9AD";
map["Capture an area or window"] = "\uC601\uC5ED \uB610\uB294 \uCC3D \uCEA1\uCC98";
map["Record the screen"] = "\uD654\uBA74 \uB179\uD654";
- map["on thumbnail to edit it"] = "\uC378\uB124\uC77C\uC744 \uD074\uB9AD\uD574 \uD3B8\uC9D1";
+ map["on thumbnail to edit it"] = "\uC378\uB124\uC77C\uC5D0\uC11C \uD3B8\uC9D1";
map["Install & get started"] = "\uC124\uCE58\uD558\uACE0 \uC2DC\uC791\uD558\uAE30";
map["Where would you like to save your captures?"] = "\uCEA1\uCC98\uB97C \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uC120\uD0DD\uD558\uC138\uC694.";
- map["You haven't taken any breaks yet today."] = "\uC624\uB298\uC740 \uC544\uC9C1 \uD734\uC2DD\uD558\uC9C0 \uC54A\uC558\uC5B4.";
+ map["You haven't taken any breaks yet today."] = "\uC624\uB298\uC740 \uC544\uC9C1 \uD734\uC2DD \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.";
map["Rest your eyes"] = "\uB208 \uC26C\uAE30";
map["Move"] = "\uC6C0\uC9C1\uC774\uAE30";
map["20 min"] = "20\uBD84";
diff --git a/src/I18n.Korean.Particle.cs b/src/I18n.Korean.Particle.cs
index da34660..6282ae4 100644
--- a/src/I18n.Korean.Particle.cs
+++ b/src/I18n.Korean.Particle.cs
@@ -17,17 +17,25 @@ public static partial class I18n
// symbol (50%), nothing at all, and a digit glued to a letter ("MP3" reads \uC4F0\uB9AC or \uC0BC).
internal static bool? KoreanFinal(string text)
{
- if (string.IsNullOrEmpty(text)) return null;
+ int e = KoreanEnding(text);
+ return e < 0 ? (bool?)null : e > 0;
+ }
+
+ // -1 when the ending can't be told, 0 for a vowel, 1 for a final consonant, 2 for the final \u3139 (\uB2EC, \uC77C, \uD314), which
+ // takes "\uB85C" like a vowel does.
+ static int KoreanEnding(string text)
+ {
+ if (string.IsNullOrEmpty(text)) return -1;
int i = text.Length - 1;
while (i >= 0 && (char.IsWhiteSpace(text[i]) || KoreanIgnorable.IndexOf(text[i]) >= 0)) i--;
- if (i < 0) return null;
+ if (i < 0) return -1;
char c = text[i];
- if (c >= '\uAC00' && c <= '\uD7A3') return (c - '\uAC00') % 28 != 0;
- if (c < '0' || c > '9') return null;
+ if (c >= '\uAC00' && c <= '\uD7A3') { int tail = (c - '\uAC00') % 28; return tail == 0 ? 0 : tail == 8 ? 2 : 1; }
+ if (c < '0' || c > '9') return -1;
int j = i;
while (j >= 0 && ((text[j] >= '0' && text[j] <= '9') || text[j] == '.' || text[j] == ',')) j--;
- if (j >= 0 && ((text[j] >= 'A' && text[j] <= 'Z') || (text[j] >= 'a' && text[j] <= 'z'))) return null;
- return "013678".IndexOf(c) >= 0;
+ if (j >= 0 && ((text[j] >= 'A' && text[j] <= 'Z') || (text[j] >= 'a' && text[j] <= 'z'))) return -1;
+ return c == '1' || c == '7' || c == '8' ? 2 : c == '0' || c == '3' || c == '6' ? 1 : 0;
}
// The particle after the word: whenFinal after a final consonant ("\uACFC", "\uC740", "\uC774", "\uC744"), whenOpen after a vowel
@@ -38,11 +46,20 @@ internal static string Josa(string word, string whenFinal, string whenOpen)
return f == null ? whenFinal + "(" + whenOpen + ")" : f.Value ? whenFinal : whenOpen;
}
+ // The particle "\uB85C" or "\uC73C\uB85C" (direction, means) after the word, and both, "(\uC73C)\uB85C", when its script doesn't say.
+ internal static string Euro(string word)
+ {
+ int e = KoreanEnding(word);
+ return e < 0 ? "(\uC73C)\uB85C" : EuroAfter(e);
+ }
+
+ static string EuroAfter(int ending) { return ending == 1 ? "\uC73C\uB85C" : "\uB85C"; }
+
// A variable of the text with the pair that follows it: the variable (with its format), the closing quotes or
// brackets between them, and the pair. Without a variable before it (a word of the text itself), only the pair.
static readonly Regex JosaSlot = new Regex(
"(?(?[0-9]+)(?:,[-+]?[0-9]+)?(?::[^{}]*)?\\})?(?[\"'\u201D\u2019\u300D\u300F\\)\\]\u3011\uFF09>]*)" +
- "(?\uC740\\(\uB294\\)|\uB294\\(\uC740\\)|\uC774\\(\uAC00\\)|\uAC00\\(\uC774\\)|\uC744\\(\uB97C\\)|\uB97C\\(\uC744\\)|\uACFC\\(\uC640\\)|\uC640\\(\uACFC\\))",
+ "(?\\(\uC73C\\)\uB85C|\uC740\\(\uB294\\)|\uB294\\(\uC740\\)|\uC774\\(\uAC00\\)|\uAC00\\(\uC774\\)|\uC744\\(\uB97C\\)|\uB97C\\(\uC744\\)|\uACFC\\(\uC640\\)|\uC640\\(\uACFC\\))",
RegexOptions.CultureInvariant);
// A catalog text writes a particle after a variable as the pair ("{0}\uC744(\uB97C)"). Settled here, in the text and
@@ -54,21 +71,22 @@ internal static string KoreanTemplate(string template, object[] args)
return JosaSlot.Replace(template, delegate(Match m)
{
Group pair = m.Groups["pair"];
- bool? f = null;
+ int e = -1;
if (m.Groups["ph"].Success)
{
int n;
if (args != null && int.TryParse(m.Groups["n"].Value, out n) && n < args.Length && args[n] != null)
{
- try { f = KoreanFinal(string.Format(Culture, m.Groups["ph"].Value, args)); }
- catch (FormatException) { f = null; }
+ try { e = KoreanEnding(string.Format(Culture, m.Groups["ph"].Value, args)); }
+ catch (FormatException) { e = -1; }
}
}
- else f = KoreanFinal(template.Substring(0, pair.Index));
- if (f == null) return m.Value;
- string v = pair.Value;
+ else e = KoreanEnding(template.Substring(0, pair.Index));
+ if (e < 0) return m.Value;
+ string v = pair.Value, head = m.Value.Substring(0, pair.Index - m.Index);
+ if (v[0] == '(') return head + EuroAfter(e);
bool finalFirst = v[0] == '\uC740' || v[0] == '\uC774' || v[0] == '\uC744' || v[0] == '\uACFC';
- return m.Value.Substring(0, pair.Index - m.Index) + (f.Value == finalFirst ? v[0] : v[2]);
+ return head + ((e > 0) == finalFirst ? v[0] : v[2]);
});
}
diff --git a/src/Markdown/MarkdownWindow.cs b/src/Markdown/MarkdownWindow.cs
index 3d2ed31..44b530f 100644
--- a/src/Markdown/MarkdownWindow.cs
+++ b/src/Markdown/MarkdownWindow.cs
@@ -669,7 +669,7 @@ void BuildZone(Grid body)
IconTile tile = new IconTile("markdown", 56, Ds.Rgb(140, 150, 255), Ds.Rgb(88, 86, 214)) { HorizontalAlignment = HorizontalAlignment.Center };
s.Children.Add(tile);
s.Children.Add(new TextBlock { Text = I18n.T("Pega o arrastra un .md, .xml o texto", "Paste or drag in a .md, .xml or text"), FontFamily = Ds.Display, FontWeight = FontWeights.SemiBold, FontSize = 20, Foreground = Ds.Brush(pal.Label), Margin = new Thickness(0, 18, 0, 0), HorizontalAlignment = HorizontalAlignment.Center });
- s.Children.Add(new TextBlock { Text = I18n.T("Ctrl+V pega desde el portapapeles. Admite .md y .txt de hasta 2 MB, y .xml de hasta 8 MB.", "Ctrl+V pastes from the clipboard. Accepts .md and .txt up to 2 MB, and .xml up to 8 MB."), FontSize = 13, Foreground = Ds.Brush(pal.Label2), Margin = new Thickness(0, 6, 0, 0), HorizontalAlignment = HorizontalAlignment.Center });
+ s.Children.Add(new TextBlock { Text = I18n.T("Ctrl+V pega desde el portapapeles. Admite .md y .txt de hasta 2 MB, y .xml de hasta 8 MB.", "Ctrl+V pastes from the clipboard. Accepts .md and .txt up to 2 MB, and .xml up to 8 MB."), FontSize = 13, Foreground = Ds.Brush(pal.Label2), Margin = new Thickness(0, 6, 0, 0), HorizontalAlignment = HorizontalAlignment.Center, TextWrapping = TextWrapping.Wrap, TextAlignment = TextAlignment.Center, MaxWidth = 480 });
StackPanel buttons = new StackPanel { Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 20, 0, 0) };
MacButton browse = new MacButton(I18n.T("Abrir archivo\u2026", "Open file\u2026"), ButtonKind.Secondary, "folder", null, 30);
browse.ToolTip = I18n.T("Abrir (Ctrl+O)", "Open (Ctrl+O)");
diff --git a/src/NameTemplate.cs b/src/NameTemplate.cs
index ddfef51..914f671 100644
--- a/src/NameTemplate.cs
+++ b/src/NameTemplate.cs
@@ -16,6 +16,8 @@ public static class NameTemplate
{
public const int MaxLength = 120; // characters before the extension
+ internal static string CaptureWord { get { return I18n.T("Captura", "Capture", "Aufnahme"); } }
+
// The tokens Ajustes offers, in its order.
public static string[] Tokens
{
@@ -209,7 +211,7 @@ public static long FirstCounter(string template, Values v, string ext, params st
public static string Example(string template, DateTime when)
{
Values v = new Values();
- v.Type = I18n.T("Captura", "Capture");
+ v.Type = CaptureWord;
v.App = "EXCEL";
v.Window = I18n.T("Informe de ventas.xlsx - Excel", "Sales Report.xlsx - Excel");
v.When = when;
diff --git a/src/ShotStack.Delayed.cs b/src/ShotStack.Delayed.cs
index aec2566..29504e7 100644
--- a/src/ShotStack.Delayed.cs
+++ b/src/ShotStack.Delayed.cs
@@ -42,7 +42,7 @@ void CaptureDelayed()
{
Bitmap shot = Grabber.Grab(r);
start.DrawPointer(shot, r.Location);
- string name = I18n.T("Captura", "Capture");
+ string name = NameTemplate.CaptureWord;
if (window != IntPtr.Zero)
{
name = Grabber.ProcessName(window) ?? name;
diff --git a/src/ShotStack.Health.cs b/src/ShotStack.Health.cs
index f55090b..d7b7d4a 100644
--- a/src/ShotStack.Health.cs
+++ b/src/ShotStack.Health.cs
@@ -215,8 +215,7 @@ public void WalkStarted()
static string Hours(int minutes)
{
- if (I18n.IsKorean) return minutes / 60 + "\uC2DC\uAC04" + (minutes % 60 > 0 ? " " + minutes % 60 + "\uBD84" : "");
- return minutes / 60 + " h" + (minutes % 60 > 0 ? " " + minutes % 60 + " min" : "");
+ return FocusClock.Minutes(minutes);
}
public bool WatchReading { get { return watchReading; } }
diff --git a/src/ShotStack.RepeatArea.cs b/src/ShotStack.RepeatArea.cs
index 85f8478..2236644 100644
--- a/src/ShotStack.RepeatArea.cs
+++ b/src/ShotStack.RepeatArea.cs
@@ -266,7 +266,7 @@ void CaptureRepeat()
Rectangle r = a.Bounds;
Bitmap shot = Grabber.Grab(r);
start.DrawPointer(shot, r.Location);
- string name = I18n.T("Captura", "Capture");
+ string name = NameTemplate.CaptureWord;
// The window clicked last time, still exactly there: its name and its rounded corners, as then.
if (a.Window != IntPtr.Zero && Grabber.Bounds(a.Window) == r)
{
diff --git a/src/ShotStack.cs b/src/ShotStack.cs
index 39698b0..c5d3dfa 100644
--- a/src/ShotStack.cs
+++ b/src/ShotStack.cs
@@ -751,7 +751,7 @@ void CaptureRegion()
if (src.Width < 1 || src.Height < 1) return;
Bitmap shot = frozen.Clone(src, PixelFormat.Format32bppArgb);
start.DrawPointer(shot, new Point(src.X + vs.X, src.Y + vs.Y));
- string name = I18n.T("Captura", "Capture");
+ string name = NameTemplate.CaptureWord;
if (window != IntPtr.Zero)
{
name = Grabber.ProcessName(window) ?? name;
@@ -1382,7 +1382,9 @@ static string Explain(Exception ex, string path, bool writing)
if (code == 32 || code == 33)
return I18n.T("Otro programa est\u00E1 usando el archivo. Ci\u00E9rralo y vuelve a intentarlo.", "Another program is using the file. Close it and try again.");
if (ex is DirectoryNotFoundException || ex is DriveNotFoundException || code == 3 || code == 21 || code == 53 || code == 67)
- return I18n.Fmt("No se encuentra la carpeta {0} (\u00BFuna unidad desconectada o de red?).", "Cannot find folder {0} (a disconnected or network drive?).", Show(where));
+ return string.IsNullOrEmpty(where)
+ ? I18n.T("No se encuentra la carpeta (\u00BFuna unidad desconectada o de red?).", "Cannot find the folder (a disconnected or network drive?).")
+ : I18n.Fmt("No se encuentra la carpeta {0} (\u00BFuna unidad desconectada o de red?).", "Cannot find folder {0} (a disconnected or network drive?).", Show(where, "Der Ordner", "Der Ordner "));
if (ex is FileNotFoundException || code == 2)
return I18n.T("El archivo ya no existe.", "The file no longer exists.");
if (ex is PathTooLongException || code == 206)
@@ -1394,9 +1396,16 @@ static string Explain(Exception ex, string path, bool writing)
return I18n.T("Ha fallado al leer o escribir el archivo. Vuelve a intentarlo; si se repite, el registro de Stackshot tiene los detalles.", "Failed to read or write the file. Try again; if it recurs, the Stackshot log has the details.");
}
- static string Show(string dir)
+ // The folder as a message names it: quoted the way the language quotes, or a plain "the folder" when there is no path.
+ // German needs the case its sentence asks for: the accusative after "in" and "f\u00FCr", the nominative before "wurde".
+ static string Show(string dir) { return Show(dir, "den Ordner", ""); }
+
+ static string Show(string dir, string deNoFolder, string dePrefix)
{
- return string.IsNullOrEmpty(dir) ? I18n.T("la carpeta", "the folder") : "\u00AB" + dir + "\u00BB";
+ if (string.IsNullOrEmpty(dir)) return I18n.T("la carpeta", "the folder", deNoFolder);
+ string open = I18n.IsSpanish ? "\u00AB" : I18n.IsGerman ? "\u201E" : I18n.IsKorean ? "\u2018" : "\u201C";
+ string close = I18n.IsSpanish ? "\u00BB" : I18n.IsGerman ? "\u201C" : I18n.IsKorean ? "\u2019" : "\u201D";
+ return (I18n.IsGerman ? dePrefix : "") + open + dir + close;
}
public bool IsKept(string path)
diff --git a/tests/app/AppTestsI18nCoverage.cs b/tests/app/AppTestsI18nCoverage.cs
index 060632f..415132f 100644
--- a/tests/app/AppTestsI18nCoverage.cs
+++ b/tests/app/AppTestsI18nCoverage.cs
@@ -113,9 +113,9 @@ public static void CatalogCoversEveryCallSite()
}
}
- // Files whose English texts are not translated on purpose: the key names of the hotkeys (Hotkeys.cs) and the
- // comments of the settings file (Settings.cs), the same as in every other language.
- static readonly string[] KoreanSkipFiles = { "Capture/Hotkeys.cs", "Settings.cs" };
+ // Files whose English texts are not translated on purpose: the comments of the settings file (Settings.cs), the
+ // same as in every other language.
+ static readonly string[] KoreanSkipFiles = { "Settings.cs" };
// The English texts an argument can be: its literal, or every literal of a plain "cond ? \"one\" : \"other\"" choice.
// Anything built at run time (a concatenation with a variable) has no fixed key and is left to the audits.
@@ -134,7 +134,8 @@ static List EnglishKeys(List arg)
static readonly string[] KoreanSameAsEnglish =
{
"%", "\u201C{0}\u201D", " \u201C{0}\u201D", "6,000", "8,000", "10,000", "12,000", "15,000", "Ctrl + Enter", "Ctrl+Enter",
- "Space", "FAIL ", "\u2026"
+ "Space", "FAIL ", "\u2026",
+ "PrtScn", "Backspace", "Del", "End", "Enter", "Insert", "Menu", "Num Lock", "Page Down", "Page Up", "Caps Lock", "Scroll Lock", "Shift"
};
// English texts that sit in the non-Korean half of a call site: an `if (I18n.IsKorean)` branch above them in the
diff --git a/tests/app/AppTestsI18nFinal.cs b/tests/app/AppTestsI18nFinal.cs
index 3f5be3b..8c97d59 100644
--- a/tests/app/AppTestsI18nFinal.cs
+++ b/tests/app/AppTestsI18nFinal.cs
@@ -49,6 +49,33 @@ public static void Suite(Action T)
T("picker-lists-only-the-complete-languages", PickerListsOnlyTheCompleteLanguages);
T("hidden-languages-load-as-automatic", HiddenLanguagesLoadAsAutomatic);
T("previews-come-back-with-the-switch", PreviewsComeBackWithTheSwitch);
+ T("korean-uninstall-note-reads-clean", KoreanUninstallNoteReadsClean);
+ T("level-up-lines-read-right", LevelUpLinesReadRight);
+ T("korean-breaks-note-keeps-one-register", KoreanBreaksNoteKeepsOneRegister);
+ T("german-durations-go-through-the-catalog", GermanDurationsGoThroughTheCatalog);
+ T("segment-seconds-and-auto-follow-the-language", SegmentSecondsAndAutoFollowTheLanguage);
+ T("german-capture-names-use-the-noun", GermanCaptureNamesUseTheNoun);
+ T("search-words-are-folded", SearchWordsAreFolded);
+ T("german-ago-has-no-double-period", GermanAgoHasNoDoublePeriod);
+ T("korean-version-sentences-have-no-open-particle", KoreanVersionSentencesHaveNoOpenParticle);
+ T("korean-euro-follows-the-value", KoreanEuroFollowsTheValue);
+ T("korean-welcome-edit-hint", KoreanWelcomeEditHint);
+ T("english-docs-say-auto-like-the-interface", EnglishDocsSayAutoLikeTheInterface);
+ T("news-spanish-arrows-match", NewsSpanishArrowsMatch);
+ T("picker-name-only-for-listed-languages", PickerNameOnlyForListedLanguages);
+ T("korean-reminder-durations", KoreanReminderDurations);
+ T("german-mascot-wording", GermanMascotWording);
+ T("search-key-is-strg-in-german", SearchKeyIsStrgInGerman);
+ T("korean-particles-after-quoted-values", KoreanParticlesAfterQuotedValues);
+ T("scrolling-plain-notice-fits", ScrollingPlainNoticeFits);
+ T("folder-errors-quote-like-the-language", FolderErrorsQuoteLikeTheLanguage);
+ T("missing-folder-without-a-path-reads-once", MissingFolderWithoutAPathReadsOnce);
+ T("german-none-choice-is-capitalized", GermanNoneChoiceIsCapitalized);
+ T("settings-search-gaps-are-closed", SettingsSearchGapsAreClosed);
+ T("markdown-zone-help-line-fits", MarkdownZoneHelpLineFits);
+ T("scroll-bar-button-labels", ScrollBarButtonLabels);
+ T("backdrop-slider-help-follows-the-language", BackdropSliderHelpFollowsTheLanguage);
+ T("korean-names-the-media-keys", KoreanNamesTheMediaKeys);
T("last-audit-screens-as-pictures", Pictures);
}
@@ -75,6 +102,25 @@ static void ReadmesCallKoreanComplete()
}
}
+ // A missing folder with no known path names the folder once, never "the folder the folder", in every language.
+ static void MissingFolderWithoutAPathReadsOnce()
+ {
+ try
+ {
+ string[][] cases = { new[] { "es", "carpeta la carpeta" }, new[] { "en", "folder the folder" },
+ new[] { "de", "Ordner den Ordner" }, new[] { "ko", "\uD3F4\uB354 \uD3F4\uB354" } };
+ foreach (string[] c in cases)
+ {
+ I18n.Apply(c[0]);
+ string t = ShotStack.Explain(new DirectoryNotFoundException(), null);
+ Check(t.IndexOf(c[1], StringComparison.Ordinal) < 0 && t.IndexOf("{0}", StringComparison.Ordinal) < 0, c[0] + ": " + t);
+ Check(t.Length > 10, c[0] + " empty: " + t);
+ if (c[0] == "ko") Check(!Regex.IsMatch(t, "[A-Za-z]"), "ko Latin: " + t);
+ }
+ }
+ finally { I18n.Apply("es"); }
+ }
+
static string Src(string rel) { return File.ReadAllText(Path.Combine(AppTestsI18nCoverage.RepoRoot(), "src", rel), Encoding.UTF8); }
static void InLanguage(string lang, Action body)
@@ -259,7 +305,7 @@ public static void KoreanWellnessIntervals()
Check(names.Length == want.Length, "seven choices");
for (int i = 1; i < want.Length; i++) Same(want[i], names[i], "Korean interval " + i);
});
- foreach (string lang in new[] { "es", "en", "de", "fr" })
+ foreach (string lang in new[] { "es", "en", "fr" })
InLanguage(lang, delegate
{
string[] names = WellKind.MinuteNames;
@@ -877,6 +923,425 @@ public static void PreviewsComeBackWithTheSwitch()
Check(I18n.Languages.Length == 5, "the switch back off hides them again");
}
+ // ---- T28: the last audit of main (areas A to D), one test per rule.
+
+ // "Recovered recordings (12 MB) remain in ...": the size stays in its parentheses and no counter word follows it.
+ public static void KoreanUninstallNoteReadsClean()
+ {
+ InLanguage("ko", delegate
+ {
+ string note = I18n.Fmt("\n\nLas grabaciones recuperadas ({0}) se quedan en {1}.", "\n\nRecovered recordings ({0}) remain in {1}.", "12 MB", "C:\\Stackshot\\recuperado");
+ Same("\n\n\uBCF5\uAD6C\uB41C \uB179\uD654(12 MB)\uB294 C:\\Stackshot\\recuperado\uC5D0 \uBCF4\uAD00\uB429\uB2C8\uB2E4.", note, "Korean uninstall note");
+ });
+ InLanguage("en", delegate { Same("\n\nRecovered recordings (12 MB) remain in C:\\x.", I18n.Fmt("\n\nLas grabaciones recuperadas ({0}) se quedan en {1}.", "\n\nRecovered recordings ({0}) remain in {1}.", "12 MB", "C:\\x"), "English uninstall note"); });
+ }
+
+ // The mascot's level-up line: a sentence of its own in Korean and German; Spanish and English as they were.
+ public static void LevelUpLinesReadRight()
+ {
+ Settings s = new Settings();
+ InLanguage("ko", delegate
+ {
+ for (int i = 0; i < MascotParts.LevelNames.Length; i++)
+ Same("\uC6B0\uB9AC \uC0AC\uC774\uAC00 \u2018" + MascotParts.LevelNames[i] + "\u2019 \uB2E8\uACC4\uAC00 \uB410\uC5B4!", MascotTalk.LevelUp(s, i), "Korean level-up " + i);
+ });
+ InLanguage("de", delegate
+ {
+ string[] want = { "Neulinge", "Kumpels", "Freunde", "beste Freunde", "unzertrennlich", "eine Legende" };
+ for (int i = 0; i < want.Length; i++) Same("Jetzt sind wir " + want[i] + "!", MascotTalk.LevelUp(s, i), "German level-up " + i);
+ });
+ InLanguage("es", delegate { Same("\u00A1Ya somos mejores amigos!", MascotTalk.LevelUp(s, 3), "Spanish level-up"); Same("\u00A1Ya somos leyenda!", MascotTalk.LevelUp(s, 5), "Spanish last level-up"); });
+ InLanguage("en", delegate { Same("We are now best friends!", MascotTalk.LevelUp(s, 3), "English level-up"); Same("We are now legend!", MascotTalk.LevelUp(s, 5), "English last level-up"); });
+ }
+
+ // One register in the Korean breaks note, as in the settings text around it.
+ public static void KoreanBreaksNoteKeepsOneRegister()
+ {
+ InLanguage("ko", delegate { Same("\uC624\uB298\uC740 \uC544\uC9C1 \uD734\uC2DD \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.", I18n.T("Hoy todav\u00EDa no has hecho ninguna pausa.", "You haven't taken any breaks yet today."), "Korean breaks note"); });
+ InLanguage("de", delegate { Same("Heute hast du noch keine Pause gemacht.", I18n.T("Hoy todav\u00EDa no has hecho ninguna pausa.", "You haven't taken any breaks yet today."), "German breaks note"); });
+ }
+
+ // Durations in German go through the catalog, as Korean's do: "25 Min.", "1 h 15 Min."; Spanish and English as before.
+ public static void GermanDurationsGoThroughTheCatalog()
+ {
+ InLanguage("de", delegate
+ {
+ Same("25 Min.", FocusClock.Minutes(25), "German 25");
+ Same("1 h", FocusClock.Minutes(60), "German 60");
+ Same("1 h 15 Min.", FocusClock.Minutes(75), "German 75");
+ Same("2 h", FocusClock.Minutes(120), "German 120");
+ Same("Nein|20 Min.|30 Min.|45 Min.|1 h|1 h 30 Min.|2 h", string.Join("|", WellKind.MinuteNames).Replace("Aus", "Nein"), "German wellness intervals");
+ Same("1 h 15 Min.", typeof(ShotStack).GetMethod("Hours", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, new object[] { 75 }).ToString(), "German health hours");
+ });
+ foreach (string lang in new[] { "es", "en" })
+ InLanguage(lang, delegate
+ {
+ Same("25 min", FocusClock.Minutes(25), lang + " 25");
+ Same("1 h 15 min", FocusClock.Minutes(75), lang + " 75");
+ Same(I18n.T("No", "Off") + "|20 min|30 min|45 min|1 h|1 h 30|2 h", string.Join("|", WellKind.MinuteNames), lang + " wellness intervals");
+ Same("2 h 5 min", typeof(ShotStack).GetMethod("Hours", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, new object[] { 125 }).ToString(), lang + " health hours");
+ });
+ }
+
+ // The seconds choices and the "Auto" choice are texts of the language, not raw literals.
+ public static void SegmentSecondsAndAutoFollowTheLanguage()
+ {
+ InLanguage("ko", delegate
+ {
+ Same("3\uCD08|5\uCD08|10\uCD08", string.Join("|", new[] { RecordSetup.Seconds(3), RecordSetup.Seconds(5), RecordSetup.Seconds(10) }), "Korean seconds");
+ });
+ foreach (string lang in new[] { "es", "en", "de" })
+ InLanguage(lang, delegate { Same("3 s|5 s|10 s", string.Join("|", new[] { RecordSetup.Seconds(3), RecordSetup.Seconds(5), RecordSetup.Seconds(10) }), lang + " seconds"); });
+ foreach (string f in new[] { "Home/HomePages.cs", "Home/HomeRecordPage.cs", "Capture/RecordSetup.cs" })
+ Check(!Regex.IsMatch(Src(f), "\"3 s\"\\s*,\\s*\"5 s\"\\s*,\\s*\"10 s\""), f + " spells the seconds choices itself");
+ Check(!Regex.IsMatch(Src("Home/HomeBackdrop.cs"), "new string\\[\\] \\{ \"Auto\", \"16:9\""), "the aspect ratio choices spell Auto itself");
+ InLanguage("ko", delegate { Same("\uC790\uB3D9", I18n.T("Auto", "Auto", "Auto"), "Korean Auto"); });
+ InLanguage("de", delegate { Same("Auto", I18n.T("Auto", "Auto", "Auto"), "German Auto"); });
+ }
+
+ // A capture's file name says what it is with a noun in German ("Aufnahme"); the region picker's button keeps its verb.
+ public static void GermanCaptureNamesUseTheNoun()
+ {
+ InLanguage("de", delegate
+ {
+ Same("Aufnahme", NameTemplate.CaptureWord, "German capture word");
+ Same("Aufnehmen", I18n.T("Capturar", "Capture"), "the button keeps the verb");
+ Check(NameTemplate.Example("{type}", new DateTime(2025, 1, 2, 3, 4, 5)).StartsWith("Aufnahme"), "the example in Settings: " + NameTemplate.Example("{type}", new DateTime(2025, 1, 2, 3, 4, 5)));
+ });
+ InLanguage("es", delegate { Same("Captura", NameTemplate.CaptureWord, "Spanish capture word"); });
+ InLanguage("en", delegate { Same("Capture", NameTemplate.CaptureWord, "English capture word"); });
+ InLanguage("ko", delegate { Same(I18n.Localize("Capture"), NameTemplate.CaptureWord, "Korean capture word"); });
+ foreach (string f in new[] { "ShotStack.cs", "ShotStack.Delayed.cs", "ShotStack.RepeatArea.cs" })
+ Check(!Src(f).Contains("I18n.T(\"Captura\", \"Capture\")"), f + " names a capture with the verb's translation");
+ }
+
+ // The settings search folds what it is given and what it knows: every synonym and filler word is in folded form.
+ public static void SearchWordsAreFolded()
+ {
+ List bad = new List();
+ foreach (string[] g in SettingsSearch.Synonyms)
+ foreach (string m in g) if (HistoryIndex.Fold(m) != m) bad.Add("synonym " + Show(m));
+ foreach (string w in SettingsSearch.StopWords) if (HistoryIndex.Fold(w) != w) bad.Add("filler " + Show(w));
+ Check(bad.Count == 0, "unfolded search words: " + string.Join(", ", bad));
+ Check(SettingsSearch.Alternatives(HistoryIndex.Fold("L\u00F6schen")).Contains("entfernen"), "l\u00F6schen finds entfernen");
+ Check(SettingsSearch.Alternatives(HistoryIndex.Fold("Lautst\u00E4rke")).Contains("ton"), "Lautst\u00E4rke finds Ton");
+ Check(SettingsSearch.Alternatives(HistoryIndex.Fold("Tastenk\u00FCrzel")).Contains("kurzbefehl"), "Tastenk\u00FCrzel finds Kurzbefehl");
+ Check(SettingsSearch.Alternatives(HistoryIndex.Fold("Schw\u00E4rzen")).Contains("datenschutz"), "schw\u00E4rzen finds Datenschutz");
+ Same("ordner|aufnahmen", string.Join("|", SettingsSearch.Words("Ordner f\u00FCr Aufnahmen \u00E4ndern")), "German filler words");
+ }
+
+ // The Settings and Home pages say "vor 12 min" in German, and no sentence that quotes it ends in two periods.
+ public static void GermanAgoHasNoDoublePeriod()
+ {
+ MethodInfo when = typeof(HomeWindow).GetMethod("When", BindingFlags.NonPublic | BindingFlags.Static);
+ DateTime past = DateTime.UtcNow.AddMinutes(-12.5);
+ InLanguage("de", delegate
+ {
+ string ago = (string)when.Invoke(null, new object[] { past });
+ Check(ago.StartsWith("vor 12"), "German ago: " + ago);
+ string a = I18n.Fmt(" \u00DAltima comprobaci\u00F3n: {0}.", " Last checked: {0}.", ago), b = I18n.Fmt("Stackshot {0} es la versi\u00F3n m\u00E1s reciente. Comprobado {1}.", "Stackshot {0} is the latest version. Checked {1}.", "2.2.2", ago);
+ Check(!a.Contains("..") && !b.Contains(".."), "double period: <" + a + "> <" + b + ">");
+ });
+ InLanguage("es", delegate { Same("hace 12 min", (string)when.Invoke(null, new object[] { past }), "Spanish ago"); });
+ InLanguage("en", delegate { Same("12 min ago", (string)when.Invoke(null, new object[] { past }), "English ago"); });
+ InLanguage("ko", delegate { Same("12\uBD84 \uC804", (string)when.Invoke(null, new object[] { past }), "Korean ago"); });
+ }
+
+ // Korean version sentences say "\uBC84\uC804\uC5D0\uC11C ... \uBC84\uC804\uC73C\uB85C" instead of leaving a particle pair open after a number.
+ public static void KoreanVersionSentencesHaveNoOpenParticle()
+ {
+ InLanguage("ko", delegate
+ {
+ Same("Stackshot\uC744 2.2.1 \uBC84\uC804\uC5D0\uC11C 2.2.2 \uBC84\uC804\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD560\uAE4C\uC694?", I18n.Fmt("\u00BFActualizar Stackshot de la versi\u00F3n {0} a la {1}?", "Update Stackshot from version {0} to {1}?", "2.2.1", "2.2.2"), "update question");
+ Same("2.3.0 \uBC84\uC804\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD560 \uC218 \uC5C6\uC74C", I18n.Fmt("No se pudo actualizar a la {0}", "Could not update to {0}", "2.3.0"), "update failed");
+ Check(!I18n.Fmt("Volver a {0}", "Reset to {0}", "{type} {date}").Contains("(\uC73C)"), "reset tooltip keeps an open pair: " + I18n.Fmt("Volver a {0}", "Reset to {0}", "{type} {date}"));
+ FieldInfo f = typeof(I18n).GetField("KoreanCatalog", BindingFlags.NonPublic | BindingFlags.Static);
+ object lazy = f.GetValue(null);
+ Dictionary catalog = (Dictionary)lazy.GetType().GetProperty("Value").GetValue(lazy, null);
+ List open = new List();
+ foreach (KeyValuePair p in catalog)
+ if (Regex.IsMatch(p.Value, "\\{\\d\\}[^ ]{0,2}\\(\uC73C\\)\uB85C") && Regex.IsMatch(p.Key, "version|\\{0\\}$")) open.Add(p.Key);
+ Check(open.Count == 0, "open (\uC73C)\uB85C after a variable: " + string.Join(" | ", open));
+ });
+ }
+
+ // After a value, \uB85C or \uC73C\uB85C is chosen from the value (\u3139 and vowels take \uB85C), as the other pairs are.
+ public static void KoreanEuroFollowsTheValue()
+ {
+ InLanguage("ko", delegate
+ {
+ string key = "{0} moved from {1} to {2}.";
+ Same("Ctrl + S \uD0A4 \uD560\uB2F9\uC744 \u2018\uC601\uC5ED \uCEA1\uCC98\u2019\uC5D0\uC11C \u2018\uC804\uCCB4 \uD654\uBA74\u2019\uC73C\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.", I18n.Fmt("", key, "Ctrl + S", "\uC601\uC5ED \uCEA1\uCC98", "\uC804\uCCB4 \uD654\uBA74"), "\uC73C\uB85C after a consonant");
+ Same("Ctrl + S \uD0A4 \uD560\uB2F9\uC744 \u2018\uD654\uBA74 \uC804\uCCB4\u2019\uC5D0\uC11C \u2018\uC601\uC5ED \uCEA1\uCC98\u2019\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.", I18n.Fmt("", key, "Ctrl + S", "\uD654\uBA74 \uC804\uCCB4", "\uC601\uC5ED \uCEA1\uCC98"), "\uB85C after a vowel");
+ Same("Ctrl + S \uD0A4 \uD560\uB2F9\uC744 \u2018\uC601\uC5ED \uCEA1\uCC98\u2019\uC5D0\uC11C \u2018\uB2EC\u2019\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.", I18n.Fmt("", key, "Ctrl + S", "\uC601\uC5ED \uCEA1\uCC98", "\uB2EC"), "\uB85C after \u3139");
+ Same("Ctrl + S \uD0A4 \uD560\uB2F9\uC744 \u2018\uC601\uC5ED \uCEA1\uCC98\u2019\uC5D0\uC11C \u2018Pixel\u2019(\uC73C)\uB85C \uC62E\uACBC\uC2B5\uB2C8\uB2E4.", I18n.Fmt("", key, "Ctrl + S", "\uC601\uC5ED \uCEA1\uCC98", "Pixel"), "both after a Latin name");
+ Same("\uC73C\uB85C", I18n.Euro("\uC0BC"), "\uC0BC \uC73C\uB85C");
+ Same("\uB85C", I18n.Euro("\uC77C"), "\uC77C \uB85C");
+ Same("(\uC73C)\uB85C", I18n.Euro("Rex"), "Latin");
+ });
+ }
+
+ // The Korean welcome says one thing per row: the key and what it does.
+ public static void KoreanWelcomeEditHint()
+ {
+ InLanguage("ko", delegate { Same("\uC378\uB124\uC77C\uC5D0\uC11C \uD3B8\uC9D1", I18n.T("en la miniatura para editarla", "on thumbnail to edit it"), "welcome edit hint"); });
+ }
+
+ // The English documents call the first choice of the language list what the English interface calls it.
+ public static void EnglishDocsSayAutoLikeTheInterface()
+ {
+ InLanguage("en", delegate { Same("Auto", I18n.Languages[0].Name, "English picker name"); });
+ string root = AppTestsI18nCoverage.RepoRoot();
+ foreach (string f in new[] { "README.md", "CHANGELOG.md" })
+ {
+ string t = File.ReadAllText(Path.Combine(root, f), Encoding.UTF8);
+ Check(!Regex.IsMatch(t, "Automatic, Espa\u00F1ol|choose Automatic|\\(Automatic\\)"), f + " calls the language choice Automatic");
+ }
+ }
+
+ // The 2.2.2 section of the Spanish news writes the settings path with the same arrows as the other three.
+ public static void NewsSpanishArrowsMatch()
+ {
+ string root = AppTestsI18nCoverage.RepoRoot();
+ foreach (string f in new[] { "novedades.md", "novedades.en.md", "novedades.de.md", "novedades.ko.md" })
+ {
+ string[] lines = File.ReadAllLines(Path.Combine(root, "docs", f), Encoding.UTF8);
+ int head = Array.FindIndex(lines, l => l.StartsWith("## 2.2.2", StringComparison.Ordinal));
+ Check(head >= 0, f + " has no 2.2.2 section");
+ for (int i = head + 1; i < lines.Length && !lines[i].StartsWith("## ", StringComparison.Ordinal); i++)
+ Check(!Regex.IsMatch(lines[i], "\\p{L} > \\p{L}"), f + " writes a settings path with > : " + lines[i]);
+ }
+ }
+
+ // The picker's name of a language the list does not offer is Automatic's, as a saved choice of it loads as Automatic.
+ public static void PickerNameOnlyForListedLanguages()
+ {
+ Check(!I18n.PreviewsListed, "previews are hidden");
+ InLanguage("es", delegate
+ {
+ Same("\uD55C\uAD6D\uC5B4", LanguagePicker.DisplayName("ko"), "a listed language");
+ foreach (string hidden in new[] { "fr", "pt", "zh", "hi", "ar", "bn", "xx" })
+ Same(I18n.Languages[0].Name, LanguagePicker.DisplayName(hidden), hidden + " shows as Automatic");
+ });
+ }
+
+ // The wellness reminders say a duration the way the language writes it, whatever its length ("2\uC2DC\uAC04", not "120\uBD84").
+ public static void KoreanReminderDurations()
+ {
+ Settings s = new Settings();
+ InLanguage("ko", delegate
+ {
+ HashSet seen = new HashSet();
+ for (int k = 0; k < WellKind.Count; k++)
+ for (int p = 0; p < 3; p++)
+ {
+ s.MascotPersonality = p;
+ for (int n = 0; n < 40; n++) { seen.Add(MascotTalk.Remind(s, k, 120)); seen.Add(MascotTalk.Remind(s, k, 90)); }
+ }
+ Check(seen.Any(t => t.Contains("2\uC2DC\uAC04")), "no reminder says 2\uC2DC\uAC04");
+ Check(!seen.Any(t => t.Contains("120\uBD84") || t.Contains("90\uBD84")), "a reminder counts hours in minutes: " + string.Join(" | ", seen.Where(t => t.Contains("120\uBD84") || t.Contains("90\uBD84"))));
+ });
+ }
+
+ // German mascot wording: "auf dem Stuhl", and the dragon's name as the German books spell it.
+ public static void GermanMascotWording()
+ {
+ Settings s = new Settings();
+ InLanguage("de", delegate
+ {
+ Same("Gronckel", MascotParts.Kinds[MascotParts.KindGronckle], "German Gronckle name");
+ HashSet seen = new HashSet();
+ for (int p = 0; p < 3; p++)
+ {
+ s.MascotPersonality = p;
+ for (int n = 0; n < 40; n++) seen.Add(MascotTalk.Remind(s, WellKind.Move, 60));
+ }
+ Check(seen.Any(t => t.Contains("auf dem Stuhl")), "no reminder says auf dem Stuhl");
+ Check(!seen.Any(t => t.Contains("in dem Stuhl")), "in dem Stuhl");
+ });
+ }
+
+ // The search field says Strg+F in German, Ctrl+F elsewhere.
+ public static void SearchKeyIsStrgInGerman()
+ {
+ InLanguage("de", delegate { Same("Strg+F", Hotkeys.CtrlF, "German"); });
+ foreach (string lang in new[] { "es", "en", "ko" }) InLanguage(lang, delegate { Same("Ctrl+F", Hotkeys.CtrlF, lang); });
+ foreach (string f in new[] { "Home/HomeHistoryPage.cs", "Home/HomeSearch.cs" })
+ Check(!Regex.IsMatch(Src(f), "(Label\\(|SetHelpText\\(box, )\"Ctrl\\+F\""), f + " shows Ctrl+F as a literal");
+ }
+
+ // No Korean text pins \uB85C, \uC740, \uC744... after a quoted variable: the pair is written and settled from the value.
+ public static void KoreanParticlesAfterQuotedValues()
+ {
+ InLanguage("ko", delegate
+ {
+ FieldInfo f = typeof(I18n).GetField("KoreanCatalog", BindingFlags.NonPublic | BindingFlags.Static);
+ object lazy = f.GetValue(null);
+ Dictionary catalog = (Dictionary)lazy.GetType().GetProperty("Value").GetValue(lazy, null);
+ Regex pinned = new Regex("\\{\\d\\}[\u201D\u2019\"']+(?:\uC73C?\uB85C|[\uC640\uACFC\uC740\uB294\uC774\uAC00\uC744\uB97C])(?![\uAC00-\uD7A3(])");
+ List bad = new List();
+ foreach (KeyValuePair p in catalog) if (pinned.IsMatch(p.Value)) bad.Add(p.Key + " => " + Show(p.Value));
+ foreach (string s in bad) Console.WriteLine(" pinned after a quote: " + s);
+ Check(bad.Count == 0, bad.Count + " Korean texts pin a particle after a quoted variable");
+ Same("Google\uC5D0\uC11C \u201Caccess_denied\u201D\uC744(\uB97C) \uBC18\uD658\uD588\uC2B5\uB2C8\uB2E4. \uD0ED\uC744 \uB2EB\uACE0 Stackshot\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.", I18n.Fmt("", "Google returned \u201C{0}\u201D. Close this tab and try again from Stackshot.", "access_denied"), "an unknown ending keeps the pair");
+ Same("Google\uC5D0\uC11C \u201C\uAC70\uBD80\uB428\u201D\uC744 \uBC18\uD658\uD588\uC2B5\uB2C8\uB2E4. \uD0ED\uC744 \uB2EB\uACE0 Stackshot\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694.", I18n.Fmt("", "Google returned \u201C{0}\u201D. Close this tab and try again from Stackshot.", "\uAC70\uBD80\uB428"), "settled by the value");
+ });
+ }
+
+ // The scrolling capture's "saved as a normal capture" notice is read whole in a three-line toast at every scale.
+ public static void ScrollingPlainNoticeFits()
+ {
+ List cut = new List();
+ foreach (string lang in new[] { "es", "en", "de", "ko" })
+ {
+ I18n.Apply(lang);
+ string title = I18n.T("Captura con desplazamiento", "Scrolling capture"), body = ScrollSession.PlainNotice;
+ foreach (float scale in new[] { 1f, 1.25f, 1.5f, 2f })
+ {
+ ToastLook look = ToastLook.For(new Notice(title, body, NoticeKind.Info), scale);
+ if (look.Clipped || look.TitleClipped) cut.Add(lang + " at " + (int)(scale * 100) + " %: " + look.Lines + " lines, " + body.Length + " chars");
+ }
+ }
+ I18n.Apply("es");
+ foreach (string c in cut) Console.WriteLine(" cut: " + c);
+ Check(cut.Count == 0, cut.Count + " notices are cut");
+ }
+
+ // A folder in an error message is quoted the way the language quotes, and the folder-less wording of German is grammatical.
+ public static void FolderErrorsQuoteLikeTheLanguage()
+ {
+ Exception denied = new UnauthorizedAccessException(), missing = new DirectoryNotFoundException(), full = new IOException("disk", unchecked((int)0x80070070));
+ string path = "C:\\Zielordner\\a.png";
+ string[][] quotes = { new[] { "es", "\u00ABC:\\Zielordner\u00BB" }, new[] { "en", "\u201CC:\\Zielordner\u201D" }, new[] { "de", "\u201EC:\\Zielordner\u201C" }, new[] { "ko", "\u2018C:\\Zielordner\u2019" } };
+ foreach (string[] q in quotes)
+ InLanguage(q[0], delegate
+ {
+ foreach (Exception ex in new[] { denied, missing, full })
+ {
+ string text = ShotStack.Explain(ex, path);
+ Check(text.Contains(q[1]), q[0] + ": the folder is not quoted " + q[1] + ": " + text);
+ if (q[0] != "es") Check(text.IndexOf('\u00AB') < 0 && text.IndexOf('\u00BB') < 0, q[0] + " uses Spanish quotes: " + text);
+ }
+ });
+ InLanguage("de", delegate
+ {
+ Same("Windows kann nicht in den Ordner schreiben. Pr\u00FCfe die Ordnerberechtigungen oder ob der \u201Ekontrollierte Ordnerzugriff\u201C ihn sch\u00FCtzt.", ShotStack.Explain(denied, null), "write denied, no folder");
+ Same("Auf dem Laufwerk f\u00FCr den Ordner ist kein Platz mehr. Schaffe Platz und versuch es erneut.", ShotStack.Explain(full, null), "disk full, no folder");
+ Same("Der Ordner wurde nicht gefunden (ein getrenntes oder Netzlaufwerk?).", ShotStack.Explain(missing, null), "folder missing, no folder");
+ Same("Der Ordner \u201EC:\\Zielordner\u201C wurde nicht gefunden (ein getrenntes oder Netzlaufwerk?).", ShotStack.Explain(missing, path), "folder missing, with folder");
+ });
+ InLanguage("es", delegate { Same("Windows no deja escribir en \u00ABC:\\Zielordner\u00BB. Comprueba los permisos de la carpeta o si \u00ABAcceso controlado a carpetas\u00BB la protege.", ShotStack.Explain(denied, path), "Spanish unchanged"); });
+ }
+
+ // "None" as a choice is "Keine" in German; the lower-case word stays inside the sentence that needs it.
+ public static void GermanNoneChoiceIsCapitalized()
+ {
+ InLanguage("de", delegate
+ {
+ Same("Keine", I18n.T("Ninguno", "None"), "German None choice");
+ Same("Keine", I18n.T("No", "None"), "German None choice, second key");
+ });
+ Check(Src("Editor/ShareCheck.cs").Contains("I18n.T(\"ninguna\", \"none\", \"keine\")"), "the sentence in the share check lost its lower-case word");
+ }
+
+ // What people type that the settings search did not know yet (English, Korean), found in the language's own index.
+ public static void SettingsSearchGapsAreClosed()
+ {
+ string[][] queries =
+ {
+ new[] { "en", "privacy", "any" }, new[] { "en", "delete", "any" }, new[] { "en", "hotkey", "any" },
+ new[] { "en", "change language", "Language" }, new[] { "en", "screenshot folder", "folder" },
+ new[] { "ko", "\uB2E4\uD06C \uBAA8\uB4DC", "\uD14C\uB9C8" }, new[] { "ko", "\uC5B8\uC5B4 \uBCC0\uACBD", "\uC5B8\uC5B4" }, new[] { "ko", "\uC708\uB3C4\uC6B0 \uC2DC\uC791", "Windows \uC2DC\uC791 \uC2DC \uC2E4\uD589" },
+ new[] { "de", "tastenk\u00FCrzel", "any" }, new[] { "de", "Lautst\u00E4rke \u00E4ndern", "any" }, new[] { "de", "l\u00F6schen", "any" }
+ };
+ List bad = new List();
+ foreach (string lang in new[] { "en", "ko", "de" })
+ {
+ I18n.Apply(lang);
+ HomeWindow hw = AppTestsI18n.Make(1);
+ try
+ {
+ List ix = hw.SearchIndexNow(null);
+ foreach (string[] q in queries)
+ {
+ if (q[0] != lang) continue;
+ List hits = SettingsSearch.Find(ix, q[1]);
+ string titles = string.Join(" | ", hits.Take(6).Select(h => h.Entry.Title));
+ bool ok = q[2] == "any" ? hits.Count > 0 : q[2] == "folder" ? hits.Any(h => h.Entry.Icon == "folder") : hits.Take(3).Any(h => h.Entry.Title == q[2]);
+ if (!ok) bad.Add(lang + " <" + q[1] + "> -> " + titles);
+ }
+ }
+ finally { hw.Shutdown(); I18n.Apply("es"); }
+ }
+ foreach (string b in bad) Console.WriteLine(" search gap: " + b);
+ Check(bad.Count == 0, bad.Count + " searches find nothing useful");
+ }
+
+ // The Markdown/XML window's empty drop zone shows its help line whole, wrapped and centred, in every language.
+ public static void MarkdownZoneHelpLineFits()
+ {
+ List bad = new List();
+ foreach (string lang in new[] { "es", "en", "de", "ko" })
+ {
+ I18n.Apply(lang);
+ Ds.Apply(1);
+ MarkdownWindow w = (MarkdownWindow)typeof(MarkdownWindow).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance)[0].Invoke(new object[] { null });
+ try
+ {
+ w.Left = -6000; w.Top = 0; w.ShowActivated = false; w.ShowInTaskbar = false;
+ w.Show();
+ w.UpdateLayout();
+ string help = I18n.T("Ctrl+V pega desde el portapapeles. Admite .md y .txt de hasta 2 MB, y .xml de hasta 8 MB.", "Ctrl+V pastes from the clipboard. Accepts .md and .txt up to 2 MB, and .xml up to 8 MB.");
+ TextBlock line = null;
+ AppTestsI18n.Walk((DependencyObject)w.Content, new HashSet(), delegate(DependencyObject d) { TextBlock t = d as TextBlock; if (t != null && t.Text == help) line = t; });
+ if (line == null) { bad.Add(lang + ": help line not found"); continue; }
+ FrameworkElement zone = (FrameworkElement)((FrameworkElement)line.Parent).Parent;
+ if (line.TextWrapping != TextWrapping.Wrap) bad.Add(lang + ": the help line does not wrap");
+ if (line.TextAlignment != TextAlignment.Center) bad.Add(lang + ": the help line is not centred");
+ if (line.ActualWidth > zone.ActualWidth - 40) bad.Add(lang + ": the help line is " + (int)line.ActualWidth + " wide in a zone " + (int)zone.ActualWidth);
+ }
+ finally { try { w.Close(); } catch (Exception) { } }
+ }
+ I18n.Apply("es");
+ foreach (string b in bad) Console.WriteLine(" zone: " + b);
+ Check(bad.Count == 0, bad.Count + " empty-zone problems");
+ }
+
+ // The scrolling capture bar's two small buttons: Auto in Hangul in Korean, "\uBA48\uCDA4" for pause in its 64 px; others as they were.
+ public static void ScrollBarButtonLabels()
+ {
+ InLanguage("ko", delegate { Same("\uC790\uB3D9", ScrollCaptureBar.AutoLabel, "Korean Auto"); Same("\uBA48\uCDA4", ScrollCaptureBar.PauseLabel, "Korean pause"); });
+ InLanguage("de", delegate { Same("Auto", ScrollCaptureBar.AutoLabel, "German Auto"); Same("Pause", ScrollCaptureBar.PauseLabel, "German pause"); });
+ InLanguage("es", delegate { Same("Auto", ScrollCaptureBar.AutoLabel, "Spanish Auto"); Same("Pausa", ScrollCaptureBar.PauseLabel, "Spanish pause"); });
+ InLanguage("en", delegate { Same("Auto", ScrollCaptureBar.AutoLabel, "English Auto"); Same("Pause", ScrollCaptureBar.PauseLabel, "English pause"); });
+ Check(!Src("Capture/ScrollCapture.cs").Contains(": \"Auto\", Ds.Semibold"), "the bar paints a literal Auto");
+ }
+
+ // What a screen reader says for a backdrop slider is in the language.
+ public static void BackdropSliderHelpFollowsTheLanguage()
+ {
+ string[][] want = { new[] { "es", "De 0 a 100" }, new[] { "en", "From 0 to 100" }, new[] { "de", "Von 0 bis 100" }, new[] { "ko", "0~100" } };
+ foreach (string[] w in want) InLanguage(w[0], delegate { Same(w[1], BgPanel.SliderRange, w[0] + " slider help"); });
+ Check(!Src("Editor/BgPanel.Access.cs").Contains("PartHelp = \"De 0 a 100\""), "the slider help is a literal");
+ }
+
+ // Korean names the media and browser keys in Hangul (the keycaps of a Korean keyboard print them in English, but these
+ // have no legend of their own); the other languages keep theirs.
+ public static void KoreanNamesTheMediaKeys()
+ {
+ System.Windows.Forms.Keys[] keys = { System.Windows.Forms.Keys.VolumeMute, System.Windows.Forms.Keys.VolumeDown, System.Windows.Forms.Keys.VolumeUp, System.Windows.Forms.Keys.MediaPlayPause,
+ System.Windows.Forms.Keys.MediaNextTrack, System.Windows.Forms.Keys.MediaPreviousTrack, System.Windows.Forms.Keys.MediaStop, System.Windows.Forms.Keys.BrowserBack, System.Windows.Forms.Keys.BrowserForward,
+ System.Windows.Forms.Keys.BrowserRefresh, System.Windows.Forms.Keys.BrowserStop, System.Windows.Forms.Keys.BrowserSearch, System.Windows.Forms.Keys.BrowserFavorites, System.Windows.Forms.Keys.BrowserHome,
+ System.Windows.Forms.Keys.LaunchMail, System.Windows.Forms.Keys.LaunchApplication1, System.Windows.Forms.Keys.LaunchApplication2, System.Windows.Forms.Keys.SelectMedia, System.Windows.Forms.Keys.Sleep };
+ InLanguage("ko", delegate
+ {
+ foreach (System.Windows.Forms.Keys k in keys) Check(Regex.IsMatch(Hotkeys.KeyName(k), "[\uAC00-\uD7A3]"), "Korean key name of " + k + " is " + Hotkeys.KeyName(k));
+ Same("\uC74C\uC18C\uAC70", Hotkeys.KeyName(System.Windows.Forms.Keys.VolumeMute), "mute");
+ });
+ InLanguage("en", delegate { Same("Mute", Hotkeys.KeyName(System.Windows.Forms.Keys.VolumeMute), "English mute"); });
+ InLanguage("de", delegate { Same("Stumm", Hotkeys.KeyName(System.Windows.Forms.Keys.VolumeMute), "German mute"); });
+ }
+
// ---- Pictures: with STACKSHOT_UI_SHOTS set to a folder, the screens this audit touched are saved there as PNG.
static void SavePng(BitmapSource b, string name)
@@ -999,6 +1464,27 @@ public static void Pictures()
}
finally { try { w.Close(); } catch (Exception) { } }
}
+ // T28: the Settings pages with the seconds choices, Auto and the German "Keine", and the empty Markdown window.
+ foreach (string lang in new[] { "de", "ko" })
+ {
+ I18n.Apply(lang);
+ Ds.Apply(1);
+ foreach (string page in new[] { "general", "record", "editor" })
+ {
+ HomeWindow hw = AppTestsI18n.Make(1);
+ try { AppTestsI18n.SetPage(hw, page); AppTestsI18n.Layout(hw); SaveElement((FrameworkElement)hw.Content, 980, 660, "t28-" + lang + "-" + page + ".png"); }
+ finally { hw.Shutdown(); }
+ }
+ MarkdownWindow mw = (MarkdownWindow)typeof(MarkdownWindow).GetConstructors(np)[0].Invoke(new object[] { null });
+ try
+ {
+ mw.Left = -6000; mw.Top = 0; mw.ShowActivated = false; mw.ShowInTaskbar = false;
+ mw.Show();
+ mw.UpdateLayout();
+ SaveElement((FrameworkElement)mw.Content, mw.ActualWidth, mw.ActualHeight, "t28-" + lang + "-markdown-empty.png");
+ }
+ finally { try { mw.Close(); } catch (Exception) { } }
+ }
}
finally { I18n.Apply("es"); }
}
diff --git a/tests/app/AppTestsI18nGerman.cs b/tests/app/AppTestsI18nGerman.cs
index 13b8053..c801f92 100644
--- a/tests/app/AppTestsI18nGerman.cs
+++ b/tests/app/AppTestsI18nGerman.cs
@@ -89,7 +89,7 @@ public static void GermanAudit()
// ReportWindow, NewsWindow, LinksWindow, QuickWindow (note and reminder), the StickyNote menu, the player, the
// region picker's hint, RecordSetup, Welcome, UpdateNotice, the pet menu and a sample of toasts: built without
- // showing them, then audited in English (nothing Spanish) and German (nothing Spanish or English).
+ // showing them, then audited in English (nothing Spanish), German and Korean (nothing Spanish or English).
public static void ExtraWindowsAudit()
{
List found = new List();
@@ -97,6 +97,7 @@ public static void ExtraWindowsAudit()
{
AuditAll(found, "en", delegate(string s) { return AppTestsI18n.LooksSpanish(s) ? "es" : null; });
AuditAll(found, "de", WhyBad);
+ AuditAll(found, "ko", WhyBad);
foreach (string f in found) Console.WriteLine(" extra: " + f);
Check(found.Count == 0, found.Count + " unlocalized texts in the other windows (listed above)");
}
@@ -105,7 +106,7 @@ public static void ExtraWindowsAudit()
static void AuditAll(List found, string lang, Func flag)
{
- Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang == "de" ? "de-DE" : "en-US");
+ Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang == "de" ? "de-DE" : lang == "ko" ? "ko-KR" : "en-US");
I18n.Apply("auto");
AuditInto(found, lang + "/report", 8, flag, ReportTexts);
AuditInto(found, lang + "/news", 5, flag, NewsTexts);
@@ -278,9 +279,9 @@ static List ToastTexts()
string[][] sample =
{
new[] { "No se pudo guardar", "Could not save the recording.", "Error" },
- new[] { "Texto copiado", "Text copied to the clipboard.", "Success" },
- new[] { "La grabaci\u00F3n ha ido a tirones", "Recording was choppy.", "Warning" },
- new[] { "Algunos atajos est\u00E1n ocupados", "Some shortcuts are occupied.", "Warning" }
+ new[] { "Texto copiado", "Text copied", "Success" },
+ new[] { "La grabaci\u00F3n ha ido a tirones", "Recording was choppy", "Warning" },
+ new[] { "Algunos atajos est\u00E1n ocupados", "Some shortcuts are occupied", "Warning" }
};
ToastStack stack = new ToastStack();
List windows = new List();
diff --git a/tests/app/AppTestsI18nLayout.cs b/tests/app/AppTestsI18nLayout.cs
index d00983c..c932125 100644
--- a/tests/app/AppTestsI18nLayout.cs
+++ b/tests/app/AppTestsI18nLayout.cs
@@ -523,8 +523,8 @@ public static void NoNumberTakesTheWindowsFormat()
// ---- Minutes
- // "25 min" is an English unit: the Korean pet menu says "25\uBD84", an hour and a quarter "1\uC2DC\uAC04 15\uBD84"; the other
- // languages keep theirs (and a language that only previews English reads the English one).
+ // "25 min" is an English unit: the Korean pet menu says "25\uBD84", an hour and a quarter "1\uC2DC\uAC04 15\uBD84", the German one
+ // "25 Min."; the other languages keep theirs (and a language that only previews English reads the English one).
public static void FocusMinutesAreLocalized()
{
List bad = new List();
@@ -533,7 +533,7 @@ public static void FocusMinutesAreLocalized()
foreach (string lang in AllLanguages)
{
I18n.Apply(lang);
- string[] want = lang == "ko" ? new[] { "25\uBD84", "1\uC2DC\uAC04", "1\uC2DC\uAC04 15\uBD84", "2\uC2DC\uAC04" } : new[] { "25 min", "1 h", "1 h 15 min", "2 h" };
+ string[] want = lang == "ko" ? new[] { "25\uBD84", "1\uC2DC\uAC04", "1\uC2DC\uAC04 15\uBD84", "2\uC2DC\uAC04" } : lang == "de" ? new[] { "25 Min.", "1 h", "1 h 15 Min.", "2 h" } : new[] { "25 min", "1 h", "1 h 15 min", "2 h" };
int[] minutes = { 25, 60, 75, 120 };
for (int i = 0; i < minutes.Length; i++)
if (FocusClock.Minutes(minutes[i]) != want[i]) bad.Add(lang + ": " + minutes[i] + " min reads \"" + Ascii(FocusClock.Minutes(minutes[i])) + "\", expected \"" + Ascii(want[i]) + "\"");