diff --git a/AUTHORS b/AUTHORS index 42533729..a077c0e9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,8 @@ Contributors for modifications: # Mike Weaver # bartschat - RTC RPi feature # casdr + # jdieg0 + # a-ira # ... and all others I might have forgotten. diff --git a/CHANGELOG b/CHANGELOG index f84b9f0b..087b728a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,19 @@ CHANGELOG +=== 1.1.3 === +* [New] Translation bt-pr +* [New] [RPi] Helper scripts to jump to wifi client mode +* [New] [RPi] Helper script to use SDCard without reboot +* [New] [RPi] Image adjustments to save SDCard for to many writes +* [Fix] Some shell incompatibilities +* [Fix] forest.py : Cleanup used folders +* [Fix] Fixed localization ID for placeholder message +* [Fix] Correct/translate German localisation strings +* [Fix] Adjust hostapd.conf with comments & addtional parameter for n-mode wifi +* [Fix] Some help about setting up WPA2 mode for AP in hostapd.conf +* [Fix] Reduce browser cache to a minimum, which solves issues with shoutbox and diskusage +* [Fix] Trigger async disk usage refresh during page load + === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/Makefile b/Makefile index 0e20e37b..6282dcb3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = piratebox-ws -VERSION = 1.1.2 +VERSION = 1.1.3 ARCH = all PB_FOLDER=piratebox PB_SRC_FOLDER=$(PB_FOLDER)/$(PB_FOLDER) diff --git a/piratebox/piratebox/bin/firewall.sh b/piratebox/piratebox/bin/firewall.sh index d10c3688..606892e3 100755 --- a/piratebox/piratebox/bin/firewall.sh +++ b/piratebox/piratebox/bin/firewall.sh @@ -42,13 +42,13 @@ if test -z "$run" ; then echo "ERROR: You need to select -s (start) or -k (stop) " help_text fi -if test -z $PIRATEBOX_CONFIG || test -z "$FIREWALL_CONFIG" ; then +if test -z "$PIRATEBOX_CONFIG" || test -z "$FIREWALL_CONFIG" ; then echo "ERROR: one of the config paths is empty, while it should not" help_text fi - . $PIRATEBOX_CONFIG || exit 6 - . $FIREWALL_CONFIG || exit 5 + . "$PIRATEBOX_CONFIG" || exit 6 + . "$FIREWALL_CONFIG" || exit 5 if [ "$run" = "start" ] ; then IPT_FLAG="-A" diff --git a/piratebox/piratebox/bin/install_piratebox.sh b/piratebox/piratebox/bin/install_piratebox.sh index df13f264..7a6e9320 100755 --- a/piratebox/piratebox/bin/install_piratebox.sh +++ b/piratebox/piratebox/bin/install_piratebox.sh @@ -46,11 +46,11 @@ PIRATEBOX_CONFIG=$1 if [ $2 = 'pyForum' ] ; then cp -v $PIRATEBOX_FOLDER/src/forest.py $WWW_FOLDER/cgi-bin - cp -v $PIRATEBOX_FOLDER/src/forest.css $WWW_FOLDER/ + cp -v $PIRATEBOX_FOLDER/src/forest.css $WWW_FOLDER/content/css mkdir -p $PIRATEBOX_FOLDER/forumspace - chmod a+rw -R $PIRATEBOX_FOLDER/forumspace + chmod a+rw -R $PIRATEBOX_FOLDER/forumspace 2> /dev/null chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/cgi-bin/forest.py - chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/forest.css + chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/content/forest.css 2> /dev/null echo "Copied the files. Recheck your PirateBox now. " fi diff --git a/piratebox/piratebox/bin/json_generation.sh b/piratebox/piratebox/bin/json_generation.sh index cfcf27b3..869466ec 100755 --- a/piratebox/piratebox/bin/json_generation.sh +++ b/piratebox/piratebox/bin/json_generation.sh @@ -31,7 +31,7 @@ echo "{ \"piratebox\" : { \"module\" : { " >> $JSON_FILE #------------ upload configuration echo -n " \"upload\" : { \"status\" : $json_droopy_enabled , \"file\" : \"$UPLOAD_MODULE_FILE\" " >> $JSON_FILE #----------- droopy specialities -if [ "$DROOPY_ENABLED" == "yes" ] ; then +if [ "$DROOPY_ENABLED" = "yes" ] ; then echo -n ", " >> $JSON_FILE echo -n " \"upload_style\" : \"droopy\" , " >> $JSON_FILE echo -n " \"droopy_port\" : \"$DROOPY_PORT\", \"droopy_host\" : \"$HOST\" " >> $JSON_FILE diff --git a/piratebox/piratebox/conf/hostapd.conf b/piratebox/piratebox/conf/hostapd.conf index 7e930962..b6d8f9d8 100644 --- a/piratebox/piratebox/conf/hostapd.conf +++ b/piratebox/piratebox/conf/hostapd.conf @@ -1,11 +1,23 @@ interface=wlan0 driver=nl80211 ssid=PirateBox - Share Freely -hw_mode=g + channel=1 #auth_algs=1 + +# Remove # to enable n wifi mode #ieee80211n=1 +#wmm_enabled=1 +#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] +hw_mode=g # Put a # in front of the following line to allow # direct client 2 client communication ap_isolate=1 + +# Uncomment the following lines to enable WPA +#wpa=2 +#wpa_key_mgmt=WPA-PSK +#wpa_pairwise=TKIP CCMP +#rsn_pairwise=CCMP +#wpa_passphrase=Somepassphrase diff --git a/piratebox/piratebox/conf/lighttpd/lighttpd.conf b/piratebox/piratebox/conf/lighttpd/lighttpd.conf index 5cbb1c9a..dfac75bc 100644 --- a/piratebox/piratebox/conf/lighttpd/lighttpd.conf +++ b/piratebox/piratebox/conf/lighttpd/lighttpd.conf @@ -95,6 +95,7 @@ $HTTP["url"] =~ "^/board/" { #------------------------------------- +setenv.add-response-header += ( "Cache-Control" => "max-age=60, must-revalidate, no-store, no-cache, public" ) # 404 Error Page with redirect # diff --git a/piratebox/piratebox/init.d/piratebox b/piratebox/piratebox/init.d/piratebox index e28e8901..b4862dbb 100755 --- a/piratebox/piratebox/init.d/piratebox +++ b/piratebox/piratebox/init.d/piratebox @@ -155,7 +155,7 @@ case "$1" in log_end_msg $? - if [ "$IPV6_ENABLE" == "yes" ] && [ "$IPV6_ADVERT" == "radvd" ] ; then + if [ "$IPV6_ENABLE" = "yes" ] && [ "$IPV6_ADVERT" = "radvd" ] ; then log_daemon_msg "Starting radvd..." start-stop-daemon --start --quiet --exec radvd -- -p $PIDFILE_RADVD -C $CONF_RADVD log_end_msg $? diff --git a/piratebox/piratebox/init.d/piratebox_alt b/piratebox/piratebox/init.d/piratebox_alt index 46883ca4..e2c27b50 100755 --- a/piratebox/piratebox/init.d/piratebox_alt +++ b/piratebox/piratebox/init.d/piratebox_alt @@ -148,7 +148,7 @@ case "$1" in $PIRATEBOX_FOLDER/bin/firewall.sh -s echo $? - if [ "$IPV6_ENABLE" == "yes" ] && [ "$IPV6_ADVERT" == "radvd" ] ; then + if [ "$IPV6_ENABLE" = "yes" ] && [ "$IPV6_ADVERT" = "radvd" ] ; then echo "Starting radvd..." start-stop-daemon -S -q -x radvd -- -p $PIDFILE_RADVD -C $CONF_RADVD echo $? diff --git a/piratebox/piratebox/rpi/bin/do_switch_client.sh b/piratebox/piratebox/rpi/bin/do_switch_client.sh new file mode 100755 index 00000000..92347787 --- /dev/null +++ b/piratebox/piratebox/rpi/bin/do_switch_client.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Wrapper script for the steps to enable wifi client + +systemctl stop piratebox +if /opt/piratebox/rpi/run_client.sh ; then + echo "Started Wifi client sucessfully!" + exit 0 +else + echo "Error while starting wifi client, restarting piratebox" + systemctl start piratebox + exit 1 +fi +exit 1 diff --git a/piratebox/piratebox/rpi/bin/run_client.sh b/piratebox/piratebox/rpi/bin/run_client.sh new file mode 100755 index 00000000..11e69abb --- /dev/null +++ b/piratebox/piratebox/rpi/bin/run_client.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Runs with wpa_supplicant & wifi device from boot folder. + +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" +WPA_SUPPLICANT="/boot/wpa_supplicant.conf" + +# Try to get wifi device +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + +# Try to connect to Wifi if wpa_supplicant.conf is available. +if [ -f "${WPA_SUPPLICANT}" ]; then + echo "Found wpa_supplicant conf, trying to connect..." + wpa_supplicant -i"${WIFI_DEVICE}" -c "${WPA_SUPPLICANT}" -B -D wext + dhcpcd "${WIFI_DEVICE}" + exit 0 +else + echo "Wifi configuration not found" + exit 1 +fi +exit 1 diff --git a/piratebox/piratebox/rpi/bin/sdcard_share.sh b/piratebox/piratebox/rpi/bin/sdcard_share.sh new file mode 100755 index 00000000..92d18742 --- /dev/null +++ b/piratebox/piratebox/rpi/bin/sdcard_share.sh @@ -0,0 +1,103 @@ +#/bin/bash + +# This script enables the SDCard as ext4 to be used as storage +# it also activates some spare for swap + +MOUNTPOINT="/mnt/sdshare" +FS="ext4" + + +SDCARD="/dev/mmcblk0" + +if test -e "$SDCARD"p3 ; then + echo "ERROR: SWAP already exists" + exit 1 +fi + +if test -e "$SDCARD"p4 ; then + echo "ERROR: Data partition already exists" + exit 1 +fi + +echo "Creating partitions.." +fdisk "$SDCARD" <> /etc/fstab + +echo "Creating data partition" +mkfs.ext4 -F "$SDCARD"p4 +if [ $? -ne 0 ] ; then + echo "Error formating data" + exit 1 +fi + +DATA_UUID=$( blkid | grep "${SDCARD}p4.*TYPE=\"ext4\"" | egrep -o " UUID=\"([a-zA-Z0-9-])*\"" | sed 's/ //g' ) +if grep -q "${DATA_UUID}" /etc/fstab ; then + echo "Error: data is already configured in fstab" + exit 1 +fi + +echo "${DATA_UUID} ${MOUNTPOINT} ext4 defaults,noatime,nodiratime,data=writeback 0 0 ">> /etc/fstab + +mkdir -p "${MOUNTPOINT}" +mount "${MOUNTPOINT}" + +if [ $? -ne 0 ] ; then + echo "ERROR mounting data partion" + exit 1 +fi + +echo "## Moving files..." +mv /opt/piratebox/share "${MOUNTPOINT}/share" > /dev/null 2>&1 +ln -s "${MOUNTPOINT}/share" /opt/piratebox/share > /dev/null + + +# Force update diskwirte +touch -t 197001010101 /opt/piratebox/www/diskusage.html +wget http://127.0.0.1/cgi-bin/diskwrite.py -q -O - + +exit 0 + diff --git a/piratebox/piratebox/rpi/bin/starter.sh b/piratebox/piratebox/rpi/bin/starter.sh index 61cad4f4..1eb5b5d1 100755 --- a/piratebox/piratebox/rpi/bin/starter.sh +++ b/piratebox/piratebox/rpi/bin/starter.sh @@ -1,3 +1,18 @@ #!/bin/sh # Try to setup WiFi and if it succeeds, start the PirateBox -/bin/sh -c /opt/piratebox/rpi/bin/wifi_detect.sh && /usr/bin/systemctl start piratebox + +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" + +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + + +if [ "${INTERFACE}" = "${WIFI_DEVICE}" ] ; then + /bin/sh -c /opt/piratebox/rpi/bin/wifi_detect.sh && /usr/bin/systemctl start piratebox +fi +exit 0 diff --git a/piratebox/piratebox/rpi/bin/switch_to_client.sh b/piratebox/piratebox/rpi/bin/switch_to_client.sh new file mode 100755 index 00000000..a2bee92d --- /dev/null +++ b/piratebox/piratebox/rpi/bin/switch_to_client.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# User friendly way to switch to client +# Adds "nohup" option... + +nohup /opt/piratebox/rpi/bin/do_switch_client.sh diff --git a/piratebox/piratebox/rpi/bin/usb_share.sh b/piratebox/piratebox/rpi/bin/usb_share.sh index 790abf21..bdcf5244 100755 --- a/piratebox/piratebox/rpi/bin/usb_share.sh +++ b/piratebox/piratebox/rpi/bin/usb_share.sh @@ -39,4 +39,8 @@ else cat "/etc/fstab" fi +# Force update diskwirte +touch -t 197001010101 /opt/piratebox/www/diskusage.html +wget http://127.0.0.1/cgi-bin/diskwrite.py -q -O - + exit 0 diff --git a/piratebox/piratebox/rpi/bin/wifi_detect.sh b/piratebox/piratebox/rpi/bin/wifi_detect.sh index f1dd2a11..68e3c5a2 100755 --- a/piratebox/piratebox/rpi/bin/wifi_detect.sh +++ b/piratebox/piratebox/rpi/bin/wifi_detect.sh @@ -3,29 +3,69 @@ # Install the proper hostapd package and adjust the hostapd configuration # accordingly. +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" + PACKAGE_PATH="/prebuild/hostapd" CONFIG_PATH="/opt/piratebox/conf/hostapd.conf" +PIRATEBOX_CONFIG_PATH="/opt/piratebox/conf/piratebox.conf" + +## Only use if it is set +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + +hostap_interface=$( grep -e '^interface' "${CONFIG_PATH}" | sed -e 's|interface=||' ) +piratebox_interface=$( grep -e '^INTERFACE' "${PIRATEBOX_CONFIG_PATH}" | \ + sed -e 's|INTERFACE=||' -e 's|"||g' ) +dnsmasq_interface=$( grep -e '^DNSMASQ_INTERFACE' "${PIRATEBOX_CONFIG_PATH}" | \ + sed -e 's|DNSMASQ_INTERFACE=||' -e 's|"||g' ) + +sed -i -e "s|interface=$hostap_interface|interface=$WIFI_DEVICE|" "${CONFIG_PATH}" + +#Only change piratebox interface if it is a wifi interface +if echo "$piratebox_interface" | grep -q "wlan" ; then + sed -i -e "s|INTERFACE=\"$piratebox_interface\"|INTERFACE=\"$WIFI_DEVICE\"|" \ + "${PIRATEBOX_CONFIG_PATH}" +fi +if echo "$dnsmasq_interface" | grep -q "wlan" ; then + sed -i -e "s|DNSMASQ_INTERFACE=\"$dnsmasq_interface\"|DNSMASQ_INTERFACE=\"$WIFI_DEVICE\"|" \ + "${PIRATEBOX_CONFIG_PATH}" +fi + + + +## Get pyhX device node +CARD_ID=$( cat /sys/class/net/"${WIFI_DEVICE}"/phy80211/index ) + # Check if we have an nl80211 enabled device with AP mode, then we are done -if iw list | grep > /dev/null "* AP$"; then +if iw phy phy"${CARD_ID}" info | grep -q "* AP$"; then echo "Found nl80211 device capable of AP mode..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-2"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-2"* > /dev/null sed -i 's/^#driver=nl80211/driver=nl80211/' "${CONFIG_PATH}" exit 0 fi +#Get driver name +DRIVER_NAME=$( ls -1 /sys/class/net/"${WIFI_DEVICE}"/device/driver/module/drivers/ ) + # Check for r8188eu enabled device -if dmesg | grep > /dev/null "r8188eu:"; then +if echo "$DRIVER_NAME" | grep -q "r8188eu:"; then echo "Found r8188eu enabled device..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-8188eu-"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-8188eu-"* > /dev/null sed -i 's/^driver=nl80211/#driver=nl80211/' "${CONFIG_PATH}" exit 0 fi + # Check for rtl8192cu enabled device -if dmesg | grep > /dev/null "rtl8192cu"; then +if echo "$DRIVER_NAME" | grep -q "rtl8192cu"; then echo "Found rtl8192cu enabled device..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-8192cu-"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-8192cu-"* > /dev/null sed -i 's/^driver=nl80211/#driver=nl80211/' "${CONFIG_PATH}" exit 0 fi @@ -34,9 +74,9 @@ echo "Could not find an AP enabled WiFi card..." # Try to connect to Wifi if wpa_supplicant.conf is available. if [ -f /boot/wpa_supplicant.conf ]; then - echo "Found wpa_supplicant conf, trying to connect..." - wpa_supplicant -iwlan0 -c /boot/wpa_supplicant.conf -B -D wext - dhcpcd wlan0 + /opt/piratebox/rpi/bin/run_client.sh + exit 1 + # Exit =! 0 will result in not starting piratebox service fi exit 1 diff --git a/piratebox/piratebox/rpi/motd.txt b/piratebox/piratebox/rpi/motd.txt index be918fc7..626df556 100644 --- a/piratebox/piratebox/rpi/motd.txt +++ b/piratebox/piratebox/rpi/motd.txt @@ -5,8 +5,8 @@ ____________________.__ __ __________ |____|_ /|____| |__||__| (____ /__| \___ >______ /\____/__/\_ \ \/ \/ \/ \/ \/ -Website: http://piratebox.cc PirateBox Version: 1.1.1 -Forum: http://forum.piratebox.cc RPi Image Version: 1.1.1-1 +Website: http://piratebox.cc PirateBox Version: 1.1.3 +Forum: http://forum.piratebox.cc RPi Image Version: 1.1.3-1 IRC: #piratebox irc.freenode.net Be open -- Share freely! First Steps After Flashing @@ -23,8 +23,9 @@ First Steps After Flashing > sudo systemctl enable timesave 3. Enable the Kareha Image and Discussion Board > sudo /opt/piratebox/bin/board-autoconf.sh -4. Enable USB thumb drive share - > sudo /opt/piratebox/rpi/bin/usb_share.sh +4. Enable USB thumb drive share OR extend SDCard + USB: > sudo /opt/piratebox/rpi/bin/usb_share.sh + SDCard: > sudo /opt/piratebox/rpi/bin/sdcard_share.sh 5. Enable UPnP Media Server > sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp > sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf diff --git a/piratebox/piratebox/src/forest.py b/piratebox/piratebox/src/forest.py index e91db3c2..d2c23bf9 100755 --- a/piratebox/piratebox/src/forest.py +++ b/piratebox/piratebox/src/forest.py @@ -64,11 +64,11 @@ # ============================================================================ # Where the threads are stored. This folder must exist. -DATA_PATH = '/opt/piratebox/forumspace/' +DATA_PATH = '/opt/piratebox/share/forumspace/' #Where the forest CGI is located (as a URL). CGI_URL='/cgi-bin/forest.py' # Where the main stylesheet is kept (as a URL). -CSS_PATH = '/forest.css' +CSS_PATH = '/content/css/forest.css' # What is the title of the board? BOARD_TITLE = 'PirateBox Board' # Simple Description of the board, appears at the top of each page diff --git a/piratebox/piratebox/www_content/index.html b/piratebox/piratebox/www_content/index.html index 5166ee35..1f092796 100644 --- a/piratebox/piratebox/www_content/index.html +++ b/piratebox/piratebox/www_content/index.html @@ -69,7 +69,7 @@

Chat

- +
diff --git a/piratebox/piratebox/www_content/js/scripts.js b/piratebox/piratebox/www_content/js/scripts.js index 22fcee36..cf2e8290 100755 --- a/piratebox/piratebox/www_content/js/scripts.js +++ b/piratebox/piratebox/www_content/js/scripts.js @@ -56,6 +56,7 @@ $(document).ready(function() { } }); + post_diskusage(); // smooth scrolling for internal links function filterPath(string) { diff --git a/piratebox/piratebox/www_content/locales/data.de.properties b/piratebox/piratebox/www_content/locales/data.de.properties index 6306fa1f..af08f189 100644 --- a/piratebox/piratebox/www_content/locales/data.de.properties +++ b/piratebox/piratebox/www_content/locales/data.de.properties @@ -5,35 +5,35 @@ link = link navbarHome = Home navbarForum = Forum navbarFiles = Dateien -navbarAbout.innerHTML = über +navbarAbout.innerHTML = Über logoIMG.alt = PirateBox logoIMG.title = PirateBox - Share Freely -welcomeWelcome = Wilkommen -welcomeDescription.innerHTML = Das Wichtigste vorweg: Hier geht nichts Illegales oder Unheimliches vor. Dies ist ein sozialer Platz, wo jeder chatten und Dateien austauschen kann und zwar anonym! Dies ist ein Offline-Netzwerk, speziell zum Filesharing und Chatten entwickelt. Vom Netz getrennt zu sein, ist die Voraussetzung fuer volle Anonymitaet. Hab Spass, chatte mit Menschen und teile Dateien, die du magst. -welcomeThanksButton.value = Thanks -sidebarUpload = Go to Upload -> -sidebarIframeNotSupported = Your browser does not support iframes.. If you want to upload something, follow this -sidebarBrowseFiles.innerHTML = Stöbere Dateien -> +welcomeWelcome = Willkommen +welcomeDescription.innerHTML = Das Wichtigste vorweg: Hier geht nichts Illegales oder Unheimliches vor. Dies ist ein sozialer Platz, wo jeder chatten und Dateien austauschen kann und zwar anonym! Dies ist ein Offline-Netzwerk, speziell zum Filesharing und Chatten entwickelt. Vom Netz getrennt zu sein, ist die Voraussetzung für volle Anonymität. Hab Spaß, chatte mit Menschen und teile Dateien, die du magst. +welcomeThanksButton.value = Alles klar! +sidebarUpload = Upload -> +sidebarIframeNotSupported = Dein Browser unterstützt keine Iframes. Wenn du etwas hochladen möchtest, hier entlang: +sidebarBrowseFiles.innerHTML = Dateien durchstöbern -> -diskUsage = Disk Usage -refreshButton.value = Refresh -refreshButton.title = Disk usage can only be refreshed every 5 minutes +diskUsage = Belegter Speicherplatz +refreshButton.value = Aktualisieren +refreshButton.title = Der belegte Speicherplatz kann nur alle 5 Minuten neu abgefragt werden. mainChatChat = Chat -mainChatSend.value = Send +mainChatSend.value = Senden mainChatName.placeholder = Alias mainChatName.value = Anonymous -mainChatMessage.placeholder = Message... -mainChatTextColor = Text Color: -mainShoutboxDefault = Default -mainShoutboxBlue = Blue -mainShoutboxGreen = Green +mainChatMessage.placeholder = Nachricht... +mainChatTextColor = Textfarbe: +mainShoutboxDefault = Standard +mainShoutboxBlue = Blau +mainShoutboxGreen = Gruen mainShoutboxOrange = Orange -mainShoutboxRed = Red +mainShoutboxRed = Rot -footerBackToTop = Back to top -footerAbout = About -footerInspired = Inspiriert durch Piratensender und der Freien Kultur Bewegung, ist die PirateBox ein in sich abgeschlossenes Geraet zur mobilen Zusammenarbeit und zum Filesharing. Die PirateBox nutzt freie, offene Software (FLOSS) um mobile, drahtlose Filesharing-Netzwerke aufzubauen, wo Nutzer Bilder, Video-, Audio-Dateien, Dokumente und andere digitale Inhalte teilen koennen. -footerFilesTopSafety = Die PirateBox wurde designt um sicher und ungefaehrlich zu sein. Es sind keine Logins/Anmeldungen erforderlich und keine Benutzer-Daten werden geloggt. Um Tracking zu vermeiden und Datenschutz sicherzustellen, ist das System absichtlich nicht mit dem Internet verbunden. +footerBackToTop = Zum Seitenanfang +footerAbout.innerHTML = Über +footerInspired.innerHTML = Inspiriert durch Piratensender und der Freien-Kultur-Bewegung, ist die PirateBox ein in sich abgeschlossenes Gerät zur mobilen Zusammenarbeit und zum Filesharing. Die PirateBox nutzt freie, offene Software (FLOSS), um mobile, drahtlose Filesharing-Netzwerke aufzubauen, wo Nutzer Bilder, Video-, Audio-Dateien, Dokumente und andere digitale Inhalte teilen können. +footerFilesTopSafety.innerHTML = Die PirateBox wurde designt, um sicher und ungefährlich zu sein. Es sind keine Logins/Registrierungen erforderlich und keine Benutzer-Daten werden geloggt. Um Tracking zu vermeiden und Datenschutz sicherzustellen, ist das System absichtlich nicht mit dem Internet verbunden. footerLicenceMain = PirateBox ist lizensiert unter GPLv3. diff --git a/piratebox/piratebox/www_content/locales/data.pt-br.properties b/piratebox/piratebox/www_content/locales/data.pt-br.properties new file mode 100644 index 00000000..b9e5838d --- /dev/null +++ b/piratebox/piratebox/www_content/locales/data.pt-br.properties @@ -0,0 +1,48 @@ +# Portuguese (Brazilian) strings +# vim: ft=jproperties + +link = link + +#Some words like "link", "chat" and "upload" I chose to keep in English, because they are kind of part of the Brazilian vocabulary and more appropriate in this case ... -- 'Akira + +navbarHome = Página Inicial +navbarForum = Fórum +navbarFiles = Arquivos +navbarAbout = Sobre +logoIMG.alt = PirateBox +logoIMG.title = PirateBox - Compartilhe Livremente + +welcomeWelcome = Bem-vindx + +# In portuguese, we have a lot of words that are flexible to gender. In the majority of the cases, these words are used in the masculine form to refer to all the genders. This pratice makes the language machist, while excluding thos who do not feel represented by this writing of the language. So, some people started to write those words with an "x" at the "end" (instead of the vowel "o" for masculine and "a" for feminine) in the hope to make this people more comfortable and included =D -- 'Akira + +welcomeDescription.innerHTML = Primeiramente, não há nada ilegal ou assustador acontecendo aqui. Este é um lugar social onde você pode conversar e compartilhar arquivos com pessoas do seu entorno de forma anônima! Esta e uma rede off-line, especialmente desenhada e desenvolvida para o compartilhamento de arquivos e serviços de chat. Estar fora do grid computacional é uma precaução para manter sua total anonimidade. Por favor, divirta-se, converse com pessoas e sinta-se livre para compartilhar os arquivos que quiser. + +welcomeThanksButton.value = Obrigadx +sidebarUpload = Ir para o Upload -> +sidebarIframeNotSupported = Seu navegador não suporta o iframes.. Caso você queira fazer o upload de algo siga, siga isto +sidebarBrowseFiles = Navegue pelos Arquivos -> + +diskUsage = Uso do Disco +refreshButton.value = Recarregar +refreshButton.title = O uso do disco pode ser recarregado apenas a cada 5 minutos + +mainChatChat = Chat +mainChatSend.value = Enviar +mainChatName.placeholder = Pseudônimo +mainChatName.value = Anônimx +mainChatMessage.placeholder = Mensagem... +mainChatTextColor = Cor do Texto: +mainShoutboxDefault = Padrão +mainShoutboxBlue = Azul +mainShoutboxGreen = Verde +mainShoutboxOrange = Laranja +mainShoutboxRed = Vermelho + +footerBackToTop = Voltar ao topo +footerAbout = Sobre +footerInspired = Inspirado pelo rádio pirata e pelo movimento da cultura livre, PirateBox é um dispositivo móvel de colaboração e compartilhamento de arquivos auto-contido. PirateBox utiliza software Livre e de Código Aberto (FLOSS, da sigla em inglês) para criar redes moveis de compartilhamento de arquivos em que usuárixs podem compartilhar imagens, vídeo, áudio, documentos e outros conteúdos digitais, de forma anônima. + +footerFilesTopSafety = PirateBox é desenhado com segurança em mente. Nenhum login é requerido e nenhum dado sobre x usuárix é gravado. O sistema é propositalmente nõo conectado à Internet, de forma a prevenir o rastreamento e preservar a privacidade dxs usuárixs. +#In portuguese both words "safe" and "secure" could be translated as "segurança" (more precisely "seguro") in this context. So I had to change the sentence slightly for something similar (in a gross translation from portuguese to english) to "PirateBox is designed with safety and security in mind". +footerLicenceMain = PirateBox é licenciado pela GPLv3. diff --git a/piratebox/piratebox/www_content/locales/locales.ini b/piratebox/piratebox/www_content/locales/locales.ini index 0c445a63..c1366d5f 100644 --- a/piratebox/piratebox/www_content/locales/locales.ini +++ b/piratebox/piratebox/www_content/locales/locales.ini @@ -6,3 +6,6 @@ [fr] @import url(data.fr.properties) + +[pt-br] +@import url(data.pt-br.properties)