Merge pull request #3127 from deltachat/adb/organize-project-structure
organize project structure
|
@ -3,8 +3,8 @@ host = https://www.transifex.com
|
|||
lang_map = id: in, ja_JP: ja, nl_NL: nl, pt_BR: pt-rBR, zh_CN: zh-rCN, zh_TW: zh-rTW
|
||||
|
||||
[o:delta-chat:p:delta-chat-app:r:stringsxml]
|
||||
file_filter = res/values-<lang>/strings.xml
|
||||
source_file = res/values/strings.xml
|
||||
file_filter = src/main/res/values-<lang>/strings.xml
|
||||
source_file = src/main/res/values/strings.xml
|
||||
source_lang = en
|
||||
type = ANDROID
|
||||
|
||||
|
|
|
@ -131,9 +131,6 @@ android {
|
|||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,18 +7,19 @@ then
|
|||
fi
|
||||
|
||||
LANG=$1
|
||||
RES=src/main/res
|
||||
|
||||
mkdir res/values-$LANG/
|
||||
mkdir $RES/values-$LANG/
|
||||
|
||||
cp res/values/strings.xml res/values-$LANG/strings.xml
|
||||
cp $RES/values/strings.xml $RES/values-$LANG/strings.xml
|
||||
|
||||
# set time to old date because transifex may have different file times
|
||||
# and does not overwrite old file
|
||||
# (using -t as sth. as -d "100 days ago" does not work on mac)
|
||||
touch -t 201901010000 res/values-$LANG/strings.xml
|
||||
touch -t 201901010000 $RES/values-$LANG/strings.xml
|
||||
|
||||
echo "res/values-$LANG/strings.xml added:"
|
||||
echo "- add the name to res/values/arrays.xml"
|
||||
echo "$RES/values-$LANG/strings.xml added:"
|
||||
echo "- add the name to $RES/values/arrays.xml"
|
||||
echo "- if needed, language mappings can be added to .tx/config"
|
||||
echo "- pull translations using ./scripts/tx-pull-translations.sh"
|
||||
echo " (on problems, 'tx -d pull' gives verbose output)"
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
echo potential errors, if any:
|
||||
|
||||
RES=./src/main/res
|
||||
|
||||
# a space after the percent sign
|
||||
# results in an IllegalFormatException in getString()
|
||||
grep --include='strings.xml' -r '\% [12]' ./res/
|
||||
grep --include='strings.xml' -r '\%[$]' ./res/
|
||||
grep --include='strings.xml' -r '\$ ' ./res/
|
||||
grep --include='strings.xml' -r ' \$' ./res/
|
||||
grep --include='strings.xml' -r '\% [12]' $RES
|
||||
grep --include='strings.xml' -r '\%[$]' $RES
|
||||
grep --include='strings.xml' -r '\$ ' $RES
|
||||
grep --include='strings.xml' -r ' \$' $RES
|
||||
|
||||
# check for broken usage of escape sequences:
|
||||
# - alert on `\ n`, `\ N`, `\n\Another paragraph` and so on
|
||||
# - allow only `\n`, `\"`, `\'` and `\’`
|
||||
# (`’` might not be escaped, but it is done often eg. in "sq", so we allow that for now)
|
||||
grep --include='strings.xml' -r "\\\\[^n\"'’]" ./res/
|
||||
grep --include='strings.xml' -r "\\\\[^n\"'’]" $RES
|
||||
|
||||
# check for usage of a single `&` - this has to be an `&`
|
||||
grep --include='strings.xml' -r "&[^a]" ./res/
|
||||
grep --include='strings.xml' -r "&[^a]" $RES
|
||||
|
||||
# single <br> is not needed - and not allowed in xml, leading to error "matching end tag missing"
|
||||
grep --include='strings.xml' -r "<br" ./res/
|
||||
grep --include='strings.xml' -r "<br" $RES
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
MAIN=./src/main
|
||||
|
||||
codespell \
|
||||
--skip './.git,./build,./res/values-*/strings.xml,,./assets/help,./jni/deltachat-core-rust' \
|
||||
--skip './.git,./build,$MAIN/res/values-*/strings.xml,,$MAIN/assets/help,./jni/deltachat-core-rust' \
|
||||
--ignore-words-list formattings
|
||||
|
|
|
@ -1 +1 @@
|
|||
../deltachat-pages/tools/create-local-help.py ../deltachat-pages/_site assets/help
|
||||
../deltachat-pages/tools/create-local-help.py ../deltachat-pages/_site src/main/assets/help
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
RES=src/main/res
|
||||
tx pull -l en
|
||||
mv res/values-en/strings.xml res/values/strings.xml
|
||||
rmdir res/values-en
|
||||
mv $RES/values-en/strings.xml $RES/values/strings.xml
|
||||
rmdir $RES/values-en
|
||||
./scripts/check-translations.sh
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
read -p "Push res/values/strings.xml to transifex? Press ENTER to continue, CTRL-C to abort."
|
||||
read -p "Push src/main/res/values/strings.xml to transifex? Press ENTER to continue, CTRL-C to abort."
|
||||
tx push -s
|
||||
./scripts/check-translations.sh
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
the main purpose of this directory is
|
||||
to define a different ic_launcher icon for the build-type 'debug'.
|
||||
|
||||
the build-process seems to prefer files from /src/debug/res
|
||||
over the ones from the /res, not totally sure, however, it
|
||||
works :)
|
||||
|
||||
btw the dev-icon is not available as vector graphic,
|
||||
the original source is in xxhdpi -
|
||||
all other resolutions are just scaled with gimp.
|
||||
|
||||
via http://onebigfunction.com/android/2016/10/06/flavor-flav-android-product-flavors-explained/
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 301 KiB After Width: | Height: | Size: 301 KiB |
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |