Skip to content

Commit d837894

Browse files
committed
Localize some additional numbers
1 parent cb1141b commit d837894

2 files changed

Lines changed: 21 additions & 22 deletions

File tree

src/L10n/en.template

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/* Language name */
22
"!Language" = "English";
33

4-
/* In files: util.py:21:21 */
4+
/* In files: util.py:22:22 */
55
"I" = "I";
66

7-
/* In files: util.py:23:23 */
7+
/* In files: util.py:24:24 */
88
"R" = "R";
99

10-
/* In files: util.py:25:25 */
10+
/* In files: util.py:26:26 */
1111
"RI" = "RI";
1212

13-
/* In files: util.py:27:27 */
13+
/* In files: util.py:28:28 */
1414
"MR" = "MR";
1515

16-
/* In files: util.py:29:29 */
16+
/* In files: util.py:30:30 */
1717
"HMC" = "HMC";
1818

1919
/* format_util.py: Credits unit; In files: format_util.py:11:11 */
2020
"Cr" = "Cr";
2121

22-
/* format_util.py: Millions unit; In files: format_util.py:95:95 */
22+
/* In files: format_util.py:96:96 */
2323
"M" = "M";
2424

25-
/* format_util.py: Thousands unit; In files: format_util.py:99:99 */
25+
/* In files: format_util.py:102:102 */
2626
"k" = "k";
2727

2828
/* settings.py: Version tag at the top of the settings pane; In files: settings.py:51:51; settings.py:59:59 */
@@ -193,7 +193,7 @@
193193
/* settings.py: Distance label for radar display settings; In files: settings.py:530:530 */
194194
"Maximum radar distance:" = "Maximum radar distance:";
195195

196-
/* load.py: Meters unit; In files: settings.py:536:536; load.py:1383:1383 */
196+
/* load.py: Meters unit; In files: settings.py:536:536; load.py:1383:1383; load.py:1788:1788 */
197197
"m" = "m";
198198

199199
/* settings.py: Radar ship location tracking enable / disable setting; In files: settings.py:540:540 */
@@ -724,7 +724,7 @@
724724
/* load.py: Sampled scan level (2/3); In files: load.py:372:372 */
725725
"Sampled" = "Sampled";
726726

727-
/* load.py: Bio scans completed indicator label; load.py: Analysed scan level (3/3); In files: load.py:374:374; load.py:1750:1750 */
727+
/* load.py: Analysed scan level (3/3); load.py: Bio scans completed indicator label; In files: load.py:374:374; load.py:1757:1757 */
728728
"Analysed" = "Analysed";
729729

730730
/* load.py: Unknown scan level; In files: load.py:375:375 */
@@ -739,7 +739,7 @@
739739
/* load.py: Indicator for multiple possible bio variants; In files: load.py:1478:1478 */
740740
"Multiple Possible" = "Multiple Possible";
741741

742-
/* load.py: Nearest waypoint text; In files: load.py:1492:1492; load.py:1782:1782 */
742+
/* load.py: Nearest waypoint text; In files: load.py:1492:1492; load.py:1790:1790 */
743743
"Nearest Saved Waypoint" = "Nearest Saved Waypoint";
744744

745745
/* load.py: Predicted bio not located label; In files: load.py:1497:1497 */
@@ -766,24 +766,24 @@
766766
/* load.py: Reminder to trigger FSS / DSS for unknown signals; In files: load.py:1590:1590 */
767767
"Check FSS for Signals (or DSS)" = "Check FSS for Signals (or DSS)";
768768

769-
/* load.py: Startup message before data has been processed; In files: load.py:1684:1684 */
769+
/* load.py: Startup message before data has been processed; In files: load.py:1691:1691 */
770770
"BioScan: Awaiting Data" = "BioScan: Awaiting Data";
771771

772-
/* load.py: General BioScan prediction title label; In files: load.py:1721:1721 */
772+
/* load.py: General BioScan prediction title label; In files: load.py:1728:1728 */
773773
"BioScan Predictions" = "BioScan Predictions";
774774

775-
/* load.py: Scan in progress indicator; In files: load.py:1772:1772 */
775+
/* load.py: Scan in progress indicator; In files: load.py:1779:1779 */
776776
"In Progress" = "In Progress";
777777

778-
/* load.py: Analysed samples list label; In files: load.py:1787:1787 */
778+
/* load.py: Analysed samples list label; In files: load.py:1795:1795 */
779779
"Analysed System Samples" = "Analysed System Samples";
780780

781-
/* load.py: No signals found in current system; In files: load.py:1794:1794 */
781+
/* load.py: No signals found in current system; In files: load.py:1802:1802 */
782782
"BioScan: No Signals Found" = "BioScan: No Signals Found";
783783

784-
/* load.py: Overlay details label; In files: load.py:1809:1809 */
784+
/* load.py: Overlay details label; In files: load.py:1817:1817 */
785785
"BioScan Details" = "BioScan Details";
786786

787-
/* load.py: Overlay no signals label; In files: load.py:1827:1827 */
787+
/* load.py: Overlay no signals label; In files: load.py:1835:1835 */
788788
"BioScan: No Signals" = "BioScan: No Signals";
789789

src/load.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,11 +1384,9 @@ def get_nearest(genus: str, waypoints: list[Waypoint]) -> str:
13841384
bearing_diff = abs(bearing - this.planet_heading) % 360
13851385
bearing_diff = 360 - bearing_diff if bearing_diff > 180 else bearing_diff
13861386
bearing_diff = bearing_diff if (this.planet_heading + bearing_diff) % 360 == bearing else bearing_diff * -1
1387-
# LANG: Degrees unit
1388-
degree_format = tr.tl('°', this.translation_context)
1389-
return '{}{} ({}{}{}), {}'.format(int(bearing), degree_format,
1387+
return '{}° ({}{}°), {}'.format(int(bearing),
13901388
'-> ' if bearing_diff >= 0 else '<- ',
1391-
int(abs(bearing_diff)), degree_format,
1389+
int(abs(bearing_diff)),
13921390
distance_formatted)
13931391

13941392
return ''
@@ -1754,7 +1752,8 @@ def update_display() -> None:
17541752
text += '{} - {} [{}G] - {}/{} {}'.format(
17551753
bio_bodies[this.location_name].get_name(),
17561754
translate_body(bio_bodies[this.location_name].get_type()),
1757-
'{:.2f}'.format(bio_bodies[this.location_name].get_gravity() / 9.797759).rstrip('0').rstrip('.'),
1755+
locale.format_string('%.2f', bio_bodies[this.location_name].get_gravity() / 9.797759, True, False)
1756+
.rstrip('0').rstrip('.'),
17581757
# LANG: Bio scans completed indicator label
17591758
complete, len(bio_bodies[this.location_name].get_flora()), tr.tl('Analysed', this.translation_context)
17601759
)

0 commit comments

Comments
 (0)