Skip to content

Commit

Permalink
German and Neo2 layout: merge altchars
Browse files Browse the repository at this point in the history
The de_rNE layout was applying overrides when plain "de" locale
was selected, leading to confused mappings.
  • Loading branch information
Klaus Weidner committed Dec 11, 2016
1 parent 2d68c06 commit 0394abc
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 3 deletions.
35 changes: 35 additions & 0 deletions java/AddMissing.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/perl

binmode(STDOUT, ":utf8");

use Getopt::Std;
getopts('c') || die;

sub read_strings {
my ($href, $file) = @_;

open(my $in, '<:utf8', $file) or die;
while (<$in>) {
#print;
chomp;
if (/string\s+name="(.*)"\s*>(.*)</) {
my $name = $1;
$$href{$name} = $_;
}
}
close $in;
}

sub main {
my %base = ();
my %sub = ();

read_strings(\%base, $ARGV[0]);
read_strings(\%sub, $ARGV[1]);

foreach my $n (%base) {
print $base{$n}, "\n" unless $sub{$n};
}
}

&main();
2 changes: 1 addition & 1 deletion java/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.pocketworkstation.pckeyboard" android:versionName="v1.39.2" android:versionCode="1039002">
package="org.pocketworkstation.pckeyboard" android:versionName="v1.39.3" android:versionCode="1039003">

<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
Expand Down
28 changes: 26 additions & 2 deletions java/res/values-de/donottranslate-altchars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,35 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="alternates_for_a">äáàâãåāæ</string>
<string name="alternates_for_ae"></string>
<string name="alternates_for_a_umlaut"></string>
<string name="alternates_for_b"></string>
<string name="alternates_for_c">çčć¢</string>
<string name="alternates_for_cyrillic_e"></string>
<string name="alternates_for_cyrillic_soft_sign"></string>
<string name="alternates_for_d">đ</string>
<string name="alternates_for_e">3€éèêë</string>
<string name="alternates_for_f">₣</string>
<string name="alternates_for_g"></string>
<string name="alternates_for_h"></string>
<string name="alternates_for_i">8íìîïī</string>
<string name="alternates_for_j"></string>
<string name="alternates_for_k"></string>
<string name="alternates_for_l">£₤λ</string>
<string name="alternates_for_m">μ</string>
<string name="alternates_for_n">ñ</string>
<string name="alternates_for_o">9öóòôõōø</string>
<string name="alternates_for_u">7üúùûū</string>
<string name="alternates_for_s">§ßš</string>
<string name="alternates_for_oe"></string>
<string name="alternates_for_o_umlaut"></string>
<string name="alternates_for_p">0π₱</string>
<string name="alternates_for_q">1@</string>
<string name="alternates_for_r">4</string>
<string name="alternates_for_s">§ßš</string>
<string name="alternates_for_t">5</string>
<string name="alternates_for_u">7üúùûū</string>
<string name="alternates_for_v"></string>
<string name="alternates_for_w">2</string>
<string name="alternates_for_x"></string>
<string name="alternates_for_y">ýÿ¥</string>
<string name="alternates_for_z">6ž</string>
</resources>
101 changes: 101 additions & 0 deletions java/res/values-de/donottranslate-keymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,46 @@
<string name="key_ae12_alt">\'`’‘”“</string>



<string name="key_ad01_main">q</string>
<string name="key_ad01_shift"></string>
<string name="key_ad01_alt">@string/alternates_for_q</string>

<string name="key_ad02_main">w</string>
<string name="key_ad02_shift"></string>
<string name="key_ad02_alt">@string/alternates_for_w</string>

<string name="key_ad03_main">e</string>
<string name="key_ad03_shift"></string>
<string name="key_ad03_alt">@string/alternates_for_e</string>

<string name="key_ad04_main">r</string>
<string name="key_ad04_shift"></string>
<string name="key_ad04_alt">@string/alternates_for_r</string>

<string name="key_ad05_main">t</string>
<string name="key_ad05_shift"></string>
<string name="key_ad05_alt">@string/alternates_for_t</string>

<string name="key_ad06_main">z</string>
<string name="key_ad06_shift">Z</string>
<string name="key_ad06_alt">@string/alternates_for_z</string>

<string name="key_ad07_main">u</string>
<string name="key_ad07_shift"></string>
<string name="key_ad07_alt">@string/alternates_for_u</string>

<string name="key_ad08_main">i</string>
<string name="key_ad08_shift"></string>
<string name="key_ad08_alt">@string/alternates_for_i</string>

<string name="key_ad09_main">o</string>
<string name="key_ad09_shift"></string>
<string name="key_ad09_alt">@string/alternates_for_o</string>

<string name="key_ad10_main">p</string>
<string name="key_ad10_shift"></string>
<string name="key_ad10_alt">@string/alternates_for_p</string>

<string name="key_ad11_main">ü</string>
<string name="key_ad11_shift">Ü</string>
Expand All @@ -95,6 +131,44 @@
<string name="key_bksl_alt">#\'†‡</string>




<string name="key_ac01_main">a</string>
<string name="key_ac01_shift"></string>
<string name="key_ac01_alt">@string/alternates_for_a</string>

<string name="key_ac02_main">s</string>
<string name="key_ac02_shift"></string>
<string name="key_ac02_alt">@string/alternates_for_s</string>

<string name="key_ac03_main">d</string>
<string name="key_ac03_shift"></string>
<string name="key_ac03_alt">@string/alternates_for_d</string>

<string name="key_ac04_main">f</string>
<string name="key_ac04_shift"></string>
<string name="key_ac04_alt">@string/alternates_for_f</string>

<string name="key_ac05_main">g</string>
<string name="key_ac05_shift"></string>
<string name="key_ac05_alt">@string/alternates_for_g</string>

<string name="key_ac06_main">h</string>
<string name="key_ac06_shift"></string>
<string name="key_ac06_alt">@string/alternates_for_h</string>

<string name="key_ac07_main">j</string>
<string name="key_ac07_shift"></string>
<string name="key_ac07_alt">@string/alternates_for_j</string>

<string name="key_ac08_main">k</string>
<string name="key_ac08_shift"></string>
<string name="key_ac08_alt">@string/alternates_for_k</string>

<string name="key_ac09_main">l</string>
<string name="key_ac09_shift"></string>
<string name="key_ac09_alt">@string/alternates_for_l</string>

<string name="key_ac10_main">ö</string>
<string name="key_ac10_shift">Ö</string>
<string name="key_ac10_alt">♦♥♠♣</string>
Expand All @@ -112,6 +186,30 @@
<string name="key_ab01_shift">Y</string>
<string name="key_ab01_alt">@string/alternates_for_y</string>

<string name="key_ab02_main">x</string>
<string name="key_ab02_shift"></string>
<string name="key_ab02_alt">@string/alternates_for_x</string>

<string name="key_ab03_main">c</string>
<string name="key_ab03_shift"></string>
<string name="key_ab03_alt">@string/alternates_for_c</string>

<string name="key_ab04_main">v</string>
<string name="key_ab04_shift"></string>
<string name="key_ab04_alt">@string/alternates_for_v</string>

<string name="key_ab05_main">b</string>
<string name="key_ab05_shift"></string>
<string name="key_ab05_alt">@string/alternates_for_b</string>

<string name="key_ab06_main">n</string>
<string name="key_ab06_shift"></string>
<string name="key_ab06_alt">@string/alternates_for_n</string>

<string name="key_ab07_main">m</string>
<string name="key_ab07_shift"></string>
<string name="key_ab07_alt">@string/alternates_for_m</string>

<string name="key_ab08_main">,</string>
<string name="key_ab08_shift">;</string>
<string name="key_ab08_alt">,;·×</string>
Expand All @@ -123,4 +221,7 @@
<string name="key_ab10_main">-</string>
<string name="key_ab10_shift">_</string>
<string name="key_ab10_alt">-_–—</string>


<string name="key_space_shift"></string>
</resources>

0 comments on commit 0394abc

Please sign in to comment.