Merge pull request #4039 from vector-im/new-guest-access

New guest access
This commit is contained in:
Luke Barnard 2017-06-07 13:40:00 +01:00 committed by GitHub
commit a158549a4c
300 changed files with 1201 additions and 221 deletions

1
scripts/check-i18n.pl Symbolic link
View file

@ -0,0 +1 @@
../../matrix-react-sdk/scripts/check-i18n.pl

View file

@ -31,6 +31,8 @@ const INCLUDE_LANGS = [
// "dest/b/...".
const COPY_LIST = [
["res/manifest.json", "webapp"],
["res/home.html", "webapp"],
["res/home/**", "webapp/home"],
["res/{media,vector-icons}/**", "webapp"],
["res/flags/*", "webapp/flags/"],
["src/skins/vector/{fonts,img}/**", "webapp"],

View file

@ -18,6 +18,9 @@
# - imagemagick --with-rsvg (because default imagemagick SVG
# renderer does not produce accurate results)
#
# on macOS, this is most easily done with:
# brew install imagemagick --with-librsvg
#
# This will clone the googlei18n flag repo before converting
# all phonenumber.js-supported country flags (as SVGs) into
# PNGs that can be used by CountryDropdown.js.
@ -42,17 +45,18 @@ for f in region-flags/svg/*.svg; do
# Run imagemagick convert
# -background none : transparent background
# -thumbnail 25x15 : resize the flag to have a height of 15.
# -resize 50x30 : resize the flag to have a height of 15px (2x)
# By default, aspect ratio is respected so the width will
# be correct and not necessarily 25px.
# -filter Lanczos : use sharper resampling to avoid muddiness
# -gravity Center : keep the image central when adding an -extent
# -border 1 : add a 1px border around the flag
# -bordercolor : set the border colour
# -extent 27x27 : surround the image with padding so that it
# has the dimensions 27x27.
convert $f -background none -thumbnail 25x15 \
-gravity Center -border 1 -bordercolor \#e0e0e0 \
-extent 27x27 $f.png
# -extent 54x54 : surround the image with padding so that it
# has the dimensions 27x27px (2x).
convert $f -background none -filter Lanczos -resize 50x30 \
-gravity Center -border 1 -bordercolor \#e0e0e0 \
-extent 54x54 $f.png
# $f.png will be region-flags/svg/XX.svg.png at this point
@ -61,6 +65,6 @@ for f in region-flags/svg/*.svg; do
# Replace .svg with .png
newname=${newname%.svg}.png
# Move the file to flags directory
mv $f.png res/flags/$newname
mv $f.png ../res/flags/$newname
echo "Generated res/flags/"$newname
done