diff --git a/program/AudioOutput.cs b/program/AudioOutput.cs index fc189a7..ae93708 100644 --- a/program/AudioOutput.cs +++ b/program/AudioOutput.cs @@ -344,9 +344,15 @@ Emit("moved " + moved + " playing stream(s)"); } + // When PulseAudio is unreachable, pactl itself waits ~30 s before giving up, + // and the UI thread waits with it. After one timeout, skip pactl for a while. + private const int PactlTimeoutMs = 3000; + private static DateTime _pactlDownUntil = DateTime.MinValue; + private static string Run(string args, out int exitCode) { exitCode = -1; + if (DateTime.UtcNow < _pactlDownUntil) return null; // recently timed out: fail fast try { var psi = new ProcessStartInfo("pactl", args) @@ -361,9 +367,21 @@ using (var p = Process.Start(psi)) { - string output = p.StandardOutput.ReadToEnd(); - string err = p.StandardError.ReadToEnd(); - if (!p.WaitForExit(3000)) { try { p.Kill(); } catch { } return null; } + // Read in the background: a blocking ReadToEnd() here would wait + // for pactl to exit on its own, so the timeout below never fired. + var outTask = p.StandardOutput.ReadToEndAsync(); + var errTask = p.StandardError.ReadToEndAsync(); + + if (!p.WaitForExit(PactlTimeoutMs)) + { + try { p.Kill(); } catch { } + _pactlDownUntil = DateTime.UtcNow.AddSeconds(30); + Emit("pactl " + args + ": no answer in " + PactlTimeoutMs + " ms — skipping pactl for 30 s"); + return null; + } + p.WaitForExit(); // flush the redirected streams + string output = outTask.Result; + string err = errTask.Result; exitCode = p.ExitCode; if (exitCode != 0 && err.Length > 0) Emit("pactl " + args + ": " + err.Trim()); return output; diff --git a/program/CaseDefinition.cs b/program/CaseDefinition.cs index 0f68588..9b8ad39 100644 --- a/program/CaseDefinition.cs +++ b/program/CaseDefinition.cs @@ -160,6 +160,28 @@ /// 23 1 = heart case, else breath /// 24..26 inhale start, exhale start, exhale end /// 27 explanation image (C100.png … C999.png) + /// Pairs row N of cases_old.csv with row N of cases_old_eng.csv (same layout, + /// English names in column 0) -> Japanese tree name -> English display name. + public static Dictionary LoadLegacyEnglishNames(string jpPath, string engPath) + { + var map = new Dictionary(); + if (!File.Exists(jpPath) || !File.Exists(engPath)) return map; + Func> names = p => + { + var l = new List(); + foreach (string raw in File.ReadAllLines(p, Encoding.UTF8)) + { + if (string.IsNullOrWhiteSpace(raw)) continue; + string line = raw.TrimStart('\uFEFF'); + l.Add(line.Split(line.Contains("\t") ? '\t' : ',')[0].Trim()); + } + return l; + }; + var jp = names(jpPath); var en = names(engPath); + for (int i = 0; i < Math.Min(jp.Count, en.Count); i++) map[jp[i]] = en[i]; + return map; + } + public static List LoadLegacyCasesFromCsv(string path) { var list = new List(); diff --git a/program/Language.cs b/program/Language.cs index 6099c91..6b4748d 100644 --- a/program/Language.cs +++ b/program/Language.cs @@ -11,10 +11,14 @@ private const string EngCsvPath = "info_eng.csv"; private const string JpnCsvPath = "info_jpn.csv"; private const string TouchCssPath = "touch_friendly.css"; // NEW + private const string NamesCsvPath = "names_eng.csv"; // Japanese case/category name -> English private readonly Dictionary _engText; private readonly Dictionary _jpnText; private Dictionary _text; + private readonly Dictionary _names; + private static readonly System.Text.RegularExpressions.Regex EnJpRx = + new System.Text.RegularExpressions.Regex(@"^(.*?)\((.*)\)\s*$"); // widgets whose label is a plain CSV lookup private readonly Dictionary _widgets = new Dictionary(); @@ -46,6 +50,7 @@ _engText = LoadText(EngCsvPath); _jpnText = LoadText(JpnCsvPath); + _names = LoadText(NamesCsvPath); // set before any widget is built, so ctor-time lookups are already correct IsEnglish = isEnglish; @@ -60,6 +65,11 @@ if (widget == null) return; widget.Name = key; // enables #Key selectors in the lang CSS _widgets[key] = widget; + + // Set the current text now, so widgets registered after the first + // Apply() (e.g. SoundWindow, built later) don't wait for a toggle. + string value; + if (_text.TryGetValue(key, out value)) SetText(widget, value); } /// Widget whose text the owner sets itself (state-dependent). Name only, no auto-apply. @@ -81,6 +91,34 @@ return key; } + /// + /// Display text for a case-tree name. The Japanese CSV value stays the lookup key; + /// this only changes what is shown. "fine crackle(捻髪音)" -> "fine crackle" in English. + /// + public string Name(string jp) + { + if (string.IsNullOrEmpty(jp) || !IsEnglish) return jp; + string en; + if (_names.TryGetValue(jp.Trim(), out en)) return en; + var m = EnJpRx.Match(jp); + if (m.Success && m.Groups[1].Value.Trim().Length > 0) return m.Groups[1].Value.Trim(); + return jp; + } + + /// Adds Japanese -> English display names (e.g. from cases_old_eng.csv). + public void AddNames(Dictionary map) + { + foreach (var kv in map) _names[kv.Key] = kv.Value; + } + + /// Display text for a whole path, e.g. "Breath sounds : Wheeze : Right lung". + public string Path(string[] parts, string sep) + { + var shown = new string[parts.Length]; + for (int i = 0; i < parts.Length; i++) shown[i] = Name(parts[i]); + return string.Join(sep, shown); + } + public string Format(string key, params object[] args) { string template = Get(key); @@ -138,6 +176,11 @@ { var result = new Dictionary(); + // Prefer the copy next to the exe (same rule as cases*.csv), so the + // app finds its text no matter which folder it was launched from. + string besideExe = SoundWindow.AppFile(path); + if (File.Exists(besideExe)) path = besideExe; + if (!File.Exists(path)) { Console.WriteLine("Warning: text file not found: " + path); diff --git a/program/MainWindow.cs b/program/MainWindow.cs index b18bdc4..c4c5294 100644 --- a/program/MainWindow.cs +++ b/program/MainWindow.cs @@ -211,7 +211,7 @@ RootNoteBook.ShowTabs = false; RootNoteBook.ShowBorder = false; RootNoteBook.CurrentPage = PageSplash; - _soundWindow = new SoundWindow(builder); + _soundWindow = new SoundWindow(builder, _Language); _soundWindow.BackRequested += (s, e) => RootNoteBook.CurrentPage = PageSplash; _soundWindow.CaseSelected += OnCaseSelected; @@ -667,7 +667,7 @@ // SoundWindow.AppFile(def.SoundPath)); // RootNoteBook.CurrentPage = PageMap; - _mapWindow.ShowCase(def, string.Join(" : ", def.TreePath)); + _mapWindow.ShowCase(def, _Language.Path(def.TreePath, " : ")); RootNoteBook.CurrentPage = PageMap; } diff --git a/program/MapWindow.cs b/program/MapWindow.cs index 680438f..8c12384 100644 --- a/program/MapWindow.cs +++ b/program/MapWindow.cs @@ -307,6 +307,14 @@ // Register() assigns Name itself and pulls the label from the CSVs. _lang.Register("MapBackButton", MapBackButton); + foreach (string id in new[] { + "BodySectionLabel","BodySkeletonRadio","BodyJacketRadio","JacketSizeLabel", + "ViewSectionLabel","ViewFrontRadio","ViewBackRadio","ViewRightRadio","ViewLeftRadio", + "DisplaySectionLabel","ShowNumbersSwitchLabel","ShowVolumeMapSwitchLabel", + "ShowPointListSwitchLabel","BlackAudioSwitchLabel","SoundFilterSectionLabel", + "SoundMixRadio","SoundHeartOnlyRadio","SoundLungOnlyRadio","MapPointHeader", + "HeartWaveHeader","BreathWaveHeader","MapExplainButton" }) + _lang.Register(id, builder.GetObject(id) as Widget); // null-safe // ── signals ─────────────────────────────────────────────────── MapArea.Drawn += OnMapDrawn; @@ -331,7 +339,7 @@ SoundTestButton.Clicked += (s, e) => ToggleOutput(); UpdateOutputButton(AudioOutput.Current(), null); } - _lang.Changed += (s, e) => { UpdateOutputButton(AudioOutput.Current(), null); UpdateContactChip(true); }; + _lang.Changed += (s, e) => { RefreshCaseTitle(); UpdateOutputButton(AudioOutput.Current(), null); UpdateContactChip(true); }; HookView(ViewFrontRadio, "front"); HookView(ViewBackRadio, "back"); @@ -992,6 +1000,15 @@ // ── public API ───────────────────────────────────────────────────── + /// Re-translates the title when the language is switched while a case is open. + private void RefreshCaseTitle() + { + if (_case == null || _lang == null) return; + string t = _lang.Path(_case.TreePath, " : "); + MapTitleLabel.Text = t; + MapCaseLabel.Text = t; + } + public void ShowCase(CaseDefinition def, string title) { _case = def; @@ -2436,7 +2453,7 @@ { RegionSound r = _regions.Find(rs => rs.Index == k); byte[] c = RegionColors[k]; - labels.Add(RegionLabels[k]); + labels.Add(_lang != null ? _lang.Name(RegionLabels[k]) : RegionLabels[k]); colors.Add(new[] { c[0] / 255.0, c[1] / 255.0, c[2] / 255.0 }); present.Add(r != null && r.Enabled); allowed.Add(k <= 1 ? HeartAllowed : LungAllowed); diff --git a/program/SoundWindow.cs b/program/SoundWindow.cs index abef23d..4f53b6f 100644 --- a/program/SoundWindow.cs +++ b/program/SoundWindow.cs @@ -33,6 +33,10 @@ private static readonly string[] BranchSubtitles = { "Breath sounds", "Heart sounds" }; private readonly List _allCases; + private readonly Language _lang; + private bool En { get { return _lang != null && _lang.IsEnglish; } } + private string Disp(string jp) { return _lang != null ? _lang.Name(jp) : jp; } + private readonly List _path = new List(); /// Raised when the drill-down reaches a leaf case. @@ -41,8 +45,9 @@ /// Raised when Back is pressed at the top level. public event EventHandler BackRequested; - public SoundWindow(Builder builder) + public SoundWindow(Builder builder, Language language) { + _lang = language; builder.Autoconnect(this); if (ConditionNameLabel == null || SoundButtonGrid == null || SoundBackButton == null) throw new InvalidOperationException( @@ -55,17 +60,23 @@ ConditionNameLabel.Name = "ConditionNameLabel"; SoundButtonGrid.Name = "SoundButtonGrid"; SoundBackButton.Name = "SoundBackButton"; - if (SoundSubtitleLabel != null) SoundSubtitleLabel.Name = "SoundSubtitleLabel"; + if (_lang != null) _lang.Register("SoundSubtitleLabel", SoundSubtitleLabel); // null-safe + else if (SoundSubtitleLabel != null) SoundSubtitleLabel.Name = "SoundSubtitleLabel"; Console.WriteLine("SoundWindow ctor: AppMode.Legacy = " + AppMode.Legacy); _allCases = AppMode.Legacy ? CaseDefinition.LoadLegacyCasesFromCsv(AppMode.CasesCsv) : CaseDefinition.LoadCasesFromCsv(AppMode.CasesCsv); + if (AppMode.Legacy && _lang != null) + _lang.AddNames(CaseDefinition.LoadLegacyEnglishNames( + AppMode.CasesCsv, AppFile("cases_old_eng.csv"))); + if (_allCases.Count == 0) Console.WriteLine("WARNING: no cases loaded — check " + AppMode.CasesCsv); SoundBackButton.Clicked += OnBackClicked; + if (_lang != null) _lang.Changed += (s, e) => Render(); } /// Call every time the page becomes visible. @@ -152,7 +163,7 @@ if (top) { - ConditionNameLabel.Text = "種別を選択"; + ConditionNameLabel.Text = En ? "Select a type" : "種別を選択"; ConditionNameLabel.Xalign = 0; ctx.RemoveClass("page-hint"); ctx.AddClass("page-title"); @@ -161,8 +172,8 @@ { // The tabs already say 呼吸音 / 心音; show deeper levels as a trail. ConditionNameLabel.Text = _path.Count == 1 - ? "音源をタッチして開始" - : string.Join(" › ", _path.Skip(1)); + ? (En ? "Touch a sound to start" : "音源をタッチして開始") + : string.Join(" › ", _path.Skip(1).Select(Disp)); ConditionNameLabel.Xalign = 1; ctx.RemoveClass("page-title"); ctx.AddClass("page-hint"); @@ -282,11 +293,11 @@ var icon = new SoundIcon(branchIx == 1 ? SoundIcon.Kind.Heart : SoundIcon.Kind.Lungs, small ? 54 : 140, active); - string sub = (branchIx >= 0 && branchIx < BranchSubtitles.Length + string sub = (!En && branchIx >= 0 && branchIx < BranchSubtitles.Length ? BranchSubtitles[branchIx] + " · " : "") - + CaseCount(name) + " 音源"; + + CaseCount(name) + (En ? " sounds" : " 音源"); - var title = new Label(name); + var title = new Label(Disp(name)); title.StyleContext.AddClass("tile-title"); var subtitle = new Label(sub); subtitle.StyleContext.AddClass("tile-sub"); @@ -325,7 +336,11 @@ { string main = text, sub = null; var m = NameRx.Match(text); - if (m.Success && m.Groups[2].Value.Trim().Length > 0) + if (En) + { + main = Disp(text); // English part of "en(jp)", or names_eng.csv + } + else if (m.Success && m.Groups[2].Value.Trim().Length > 0) { main = m.Groups[2].Value.Trim(); sub = m.Groups[1].Value.Trim(); @@ -334,7 +349,7 @@ var btn = new Button(); btn.Hexpand = true; btn.Vexpand = false; - btn.TooltipText = text; + btn.TooltipText = Disp(text); var ctx = btn.StyleContext; ctx.AddClass("sound-clip"); @@ -508,4 +523,4 @@ cr.LineTo(38, 30); cr.LineTo(50, 30); } -} \ No newline at end of file +} diff --git a/program/cases_old_eng.csv b/program/cases_old_eng.csv new file mode 100644 index 0000000..581c695 --- /dev/null +++ b/program/cases_old_eng.csv @@ -0,0 +1,26 @@ +Normal breath sounds,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND200.wav,IMG200.png,MAP201.png,SND201.wav,IMG201.png,MAP202.png,SND202.wav,IMG202.png,MAP203.png,SND203.wav,IMG203.png,MAP203.png,SND203.wav,IMG203.png,2797,0,3000,14500,31000,C999.png +Fine crackles,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND300.wav,IMG200.png,MAP208.png,SND301.wav,IMG301.png,MAP202.png,SND202.wav,IMG202.png,MAP210.png,SND210.wav,IMG210.png,MAP210.png,SND210.wav,IMG210.png,2171,0,300,12000,21000,C204.png +Coarse crackles,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND305.wav,IMG200.png,MAP208.png,SND306.wav,IMG306.png,MAP202.png,SND202.wav,IMG202.png,MAP210.png,SND220.wav,IMG220.png,MAP210.png,SND220.wav,IMG220.png,3545,0,500,17800,31300,C205.png +Rhonchi,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND310.wav,IMG310.png,MAP208.png,SND311.wav,IMG311.png,MAP202.png,SND202.wav,IMG202.png,MAP210.png,SND230.wav,IMG230.png,MAP210.png,SND230.wav,IMG230.png,4110,0,4000,18000,41000,C206.png +Wheezes,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND315.wav,IMG315.png,MAP208.png,SND316.wav,IMG316.png,MAP202.png,SND202.wav,IMG202.png,MAP210.png,SND240.wav,IMG240.png,MAP210.png,SND240.wav,IMG240.png,4216,0,3500,20400,34800,C207.png +Squawks,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND320.wav,IMG320.png,MAP208.png,SND321.wav,IMG321.png,MAP202.png,SND202.wav,IMG202.png,MAP213.png,SND250.wav,IMG250.png,MAP213.png,SND250.wav,IMG250.png,3026,0,2800,18600,38890,C208.png +Pleural friction rub,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND320.wav,IMG320.png,MAP208.png,SND321.wav,IMG321.png,MAP202.png,SND202.wav,IMG202.png,MAP210.png,SND260.wav,IMG260.png,MAP216.png,SND203.wav,IMG203.png,3270,0,500,18000,32000,C209.png +Normal heart sounds,MAP100.png,SND100.wav,heart.png,MAP101.png,SND101.wav,heart.png,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,798,1,3000,14500,31000,C999.png +Aortic stenosis,MAP105.png,SND130.wav,IMG130.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,798,1,3000,14500,31000,C102.png +Hypertrophic obstructive cardiomyopathy,MAP106.png,SND171.wav,IMG171.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,801,1,3000,14500,31000,C108.png +Ventricular septal defect,MAP106.png,SND173.wav,IMG173.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,699,1,3000,14500,31000,C110.png +Mitral regurgitation,MAP104.png,SND121.wav,IMG121.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,801,1,3000,14500,31000,C105.png +Tricuspid regurgitation,MAP106.png,SND140.wav,IMG140.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,1566,1,3000,14500,31000,C107.png +Atrial septal defect,MAP106.png,SND170.wav,IMG170.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,712,1,3000,14500,31000,C109.png +Aortic regurgitation,MAP105.png,SND131.wav,IMG131.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,793,1,3000,14500,31000,C103.png +Pulmonary regurgitation,MAP150.png,SND150.wav,IMG150.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,778,1,3000,14500,31000,C999.png +Mitral stenosis,MAP104.png,SND120.wav,IMG120.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,760,1,3000,14500,31000,C104.png +Patent ductus arteriosus,MAP106.png,SND172.wav,IMG172.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,799,1,3000,14500,31000,C111.png +Third heart sound (S3),MAP102.png,SND110.wav,IMG110.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,1013,1,3000,14500,31000,C101.png +Fourth heart sound (S4),MAP103.png,SND111.wav,IMG111.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,900,1,3000,14500,31000,C101.png +Pericardial friction rub,MAP106.png,SND160.wav,IMG160.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,985,1,3000,14500,31000,C999.png +Pericardial knock,MAP106.png,SND161.wav,IMG161.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,644,1,3000,14500,31000,C999.png +Mitral opening snap,MAP104.png,SND123.wav,IMG123.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,928,1,3000,14500,31000,C999.png +Mid-systolic click,MAP106.png,SND174.wav,IMG174.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,1089,1,3000,14500,31000,C999.png +Tricuspid stenosis,MAP106.png,SND141.wav,IMG141.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,1566,1,3000,14500,31000,C999.png +Mitral valve prolapse,MAP104.png,SND122.wav,IMG122.png,none,none,none,MAP200.png,SND200.wav,breath.png,MAP201.png,SND201.wav,breath.png,MAP202.png,SND202.wav,breath.png,MAP203.png,SND203.wav,breath.png,MAP203.png,SND203.wav,IMG203.png,800,1,3000,14500,31000,C106.png diff --git a/program/info_eng.csv b/program/info_eng.csv index 2d33a29..9420f05 100644 --- a/program/info_eng.csv +++ b/program/info_eng.csv @@ -33,4 +33,27 @@ Close.ConfirmPowerOff,The tablet will shut down.\nAre you sure? Close.ShuttingDown,Shutting down... Common.Cancel,Cancel -Common.PowerOff,Shut Down \ No newline at end of file +Common.PowerOff,Shut Down +BodySectionLabel,Body image +BodySkeletonRadio,Skeleton +BodyJacketRadio,Jacket +JacketSizeLabel,Size +ViewSectionLabel,View +ViewFrontRadio,Front +ViewBackRadio,Back +ViewRightRadio,Right +ViewLeftRadio,Left +DisplaySectionLabel,Display +ShowNumbersSwitchLabel,Show numbers +ShowVolumeMapSwitchLabel,Show volume map +ShowPointListSwitchLabel,Show auscultation point list +BlackAudioSwitchLabel,Play on black pixels too +SoundFilterSectionLabel,Sounds to play +SoundMixRadio,Mix +SoundHeartOnlyRadio,Heart only +SoundLungOnlyRadio,Lung only +MapPointHeader,Auscultation points +HeartWaveHeader,Heart sound waveform +BreathWaveHeader,Breath sound waveform +MapExplainButton,View explanation +SoundSubtitleLabel,Touch the type of sound you want to study diff --git a/program/info_jpn.csv b/program/info_jpn.csv index 350e39f..de4b382 100644 --- a/program/info_jpn.csv +++ b/program/info_jpn.csv @@ -33,4 +33,27 @@ Close.ConfirmPowerOff,タブレットの電源を切ります\nよろしいですか? Close.ShuttingDown,シャットダウン中... Common.Cancel,キャンセル -Common.PowerOff,電源を切る \ No newline at end of file +Common.PowerOff,電源を切る +BodySectionLabel,体の画像 +BodySkeletonRadio,スケルトン +BodyJacketRadio,ジャケット +JacketSizeLabel,サイズ +ViewSectionLabel,視点 +ViewFrontRadio,前 +ViewBackRadio,後 +ViewRightRadio,右 +ViewLeftRadio,左 +DisplaySectionLabel,表示 +ShowNumbersSwitchLabel,番号を表示 +ShowVolumeMapSwitchLabel,音量マップを表示 +ShowPointListSwitchLabel,聴診点リストを表示 +BlackAudioSwitchLabel,黒画素でも再生 +SoundFilterSectionLabel,再生する音 +SoundMixRadio,ミックス +SoundHeartOnlyRadio,心音のみ +SoundLungOnlyRadio,肺音のみ +MapPointHeader,聴診点 +HeartWaveHeader,心音波形 +BreathWaveHeader,呼吸音波形 +MapExplainButton,解説を見る +SoundSubtitleLabel,学習したい音の種類をタッチしてください diff --git a/program/names_eng.csv b/program/names_eng.csv new file mode 100644 index 0000000..fa623ef --- /dev/null +++ b/program/names_eng.csv @@ -0,0 +1,45 @@ +jp,en +呼吸音,Breath sounds +心音,Heart sounds +正常呼吸音,Normal breath sounds +気管音,Tracheal +気管支音,Bronchial +気管支肺胞音,Bronchovesicular +肺胞音,Vesicular +両肺,Both lungs +右肺,Right lung +左肺,Left lung +全肺野,All lung fields +上肺野,Upper lung fields +下肺野,Lower lung fields +両肺下肺野,Both lower lung fields +右肺下肺野,Right lower lung field +左肺下肺野,Left lower lung field +大動脈弁狭窄症,Aortic stenosis +閉塞性肥大型心筋症,Hypertrophic obstructive cardiomyopathy +心室中隔欠損症,Ventricular septal defect +僧帽弁逆流症,Mitral regurgitation +三尖弁逆流症,Tricuspid regurgitation +心房中隔欠損症,Atrial septal defect +大動脈弁逆流症,Aortic regurgitation +肺動脈弁逆流症,Pulmonary regurgitation +僧帽弁狭窄症,Mitral stenosis +動脈管開存症,Patent ductus arteriosus +Ⅰ音,S1 (first heart sound) +Ⅱ音,S2 (second heart sound) +Ⅲ音,S3 (third heart sound) +Ⅳ音,S4 (fourth heart sound) +心膜摩擦音,Pericardial friction rub +心膜ノック音,Pericardial knock +僧帽弁解放音,Mitral opening snap +収縮中期クリック音,Mid-systolic click +三尖弁狭窄症,Tricuspid stenosis +肺動脈弁狭窄症,Pulmonary stenosis +僧帽弁逸脱症,Mitral valve prolapse +心音1,Heart 1 +心音2,Heart 2 +気管,Trachea +気管支,Bronchus +気管支肺胞,Bronchovesicular +右肺胞,Right alveolar +左肺胞,Left alveolar