This repository was merged into the main repository.
This repo holds the Add-On API module and all the official language packs and themes for AnySoftKeyboard (in a mono-repo style).
Each language is a set of two modules, pack
and apk
. pack
is an Android library that holds all the information about the language pack (keyboards, dictionaries, receivers, etc.),
while apk
bundles that into an installable (and publishable) APK.
NOTE: this repo is in transition to mono-repo style. Some language-packs are in master while others are still in the old structure where each language-pack is a branch.
Let's say you want to create a language-pack for Klingon. We'll call the pack klingon
, and its locale is kl
.
cp -R english klingon
.settings.gradle
, add the line:
include ":languages:klingon:pack", ":languages:klingon:apk"
com.anysoftkeyboard.english.*
-> com.anysoftkeyboard.klingon.*
:
package
value in AndroidManifest.xml
files (one in pack
and the second in apk
).PackBroadcastReceiver
package to the right place.english_keyboards.xml
and english_dictionary.xml
files (under klingon/pack/src/main/res/xml
) to klingon_keyboards.xml
and klingon_dictionaries.xml
.klingon/pack/dictionary
with inputs matching your language (and remove what's not relevant):
XX_wordlist.combined.gz
file).klingon/pack/dictionary/prebuilt
../gradlew :languages:klingon:pack:makeDictionary
. This will create the following files (which should not checked into the repo):
klingon/pack/src/main/res/raw/klingon_words_?.dict
klingon/pack/src/main/res/values/klingon_words_dict_array.xml
klingon_dictionaries.xml
:
@array/klingon_words_dict_array
id
with a new GUID.klingon/pack/build.gradle
: ext.status_icon_text = "kl"
klingon/apk/flag
with a, high-quality, png or svg, image of the flag. It should be named flag.png
or flag.svg
. Note that sometimes svg files are not converted correctly, but they will produce highest quality if successful../gradlew :languages:klingon:pack:generateLanguagePackIcons :languages:klingon:apk:generateStoreLogoIcon
. This will generate the following files (which should be checked into the repo):
klingon/pack/src/main/res/drawable-*/ic_status_klingon.png
klingon/apk/src/main/res/mipmap-*/ic_launcher.png
klingon/apk/src/main/play/listings/en-US/graphics/feature-graphic/pack_store_feature_graphics.png
klingon/apk/src/main/play/listings/en-US/graphics/icon/pack_store_icon.png
klingon_keyboards.xml
. For each of the layouts you want in your pack (the layouts you created in the previous step):
defaultDictionaryLocale
to match the value you used in klingon_dictionaries.xml
.iconResId
to the generate icon @drawable/ic_status_kl
At this point, you should be able to build an APK that can be installed on your device:
./gradlew :languages:klingon:apk:assembleDebug
or directly install it on your connected device:
./gradlew :languages:klingon:apk:installDebug
Iterate on your pack until you feel it is good, and then create a PR to merge it to the master.
You can either publish by yourself, under your developer account and keep complete ownership, or you can let us (aka AnySoftKeyboard organization) do it.
TO DO!!!
Copyright 2018 Menny Even-Danan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.