Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "WeatherApp",
"slug": "WeatherApp",
"owner": "nilusnk",
"version": "1.1.0",
"version": "1.1.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand Down
4 changes: 3 additions & 1 deletion assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"humidity": "Luftfeuchtigkeit",
"name": "Name",
"height": "Höhe",
"lastMeasurement": "Letzte Messung"
"lastMeasurement": "Letzte Messung",
"week": "Woche",
"day": "Tag"
}
4 changes: 3 additions & 1 deletion assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"humidity": "Humidity",
"name": "Name",
"height": "Height",
"lastMeasurement": "Last measurement"
"lastMeasurement": "Last measurement",
"week": "Week",
"day": "Day"
}
13 changes: 13 additions & 0 deletions assets/translations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search": "Búsqueda",
"stationsFound": "Estación <v> estación(es)",
"temperature": "Temperatura",
"temperatureIndex": "Temperatura percibida",
"temperatureIndexShort": "Percibida",
"humidity": "Humedad",
"name": "Nombre",
"height": "Altura",
"lastMeasurement": "Última medición",
"week": "Semana",
"day": "Día"
}
13 changes: 13 additions & 0 deletions assets/translations/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search": "Recherche",
"stationsFound": "trouvé <v> station(s)",
"temperature": "Température",
"temperatureIndex": "Température perçue",
"temperatureIndexShort": "Ressentie",
"humidity": "Humidité",
"name": "Nom",
"height": "Hauteur",
"lastMeasurement": "Dernière mesure",
"week": "Semaine",
"day": "jour"
}
13 changes: 13 additions & 0 deletions assets/translations/nl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search": "zoeken",
"stationsFound": "Gevonden <v> station(s)",
"temperature": "Temperatuur",
"temperatureIndex": "Waargenomen temperatuur",
"temperatureIndexShort": "Gevoeld",
"humidity": "Vochtigheid",
"name": "Naam",
"height": "Hoogte",
"lastMeasurement": "Laatste meting",
"week": "Week",
"day": "Dag"
}
13 changes: 13 additions & 0 deletions assets/translations/ro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search": "Căutare",
"stationsFound": "Stații <v> găsite",
"temperature": "Temperatura",
"temperatureIndex": "Temperatura percepută",
"temperatureIndexShort": "Perceived",
"humidity": "Umiditate",
"name": "Nume",
"height": "Înălțime",
"lastMeasurement": "Ultima măsurare",
"week": "Săptămâna",
"day": "Zi"
}
13 changes: 13 additions & 0 deletions assets/translations/zh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search": "搜索",
"stationsFound": "<v>发现车站",
"temperature": "温度",
"temperatureIndex": "温度感觉",
"temperatureIndexShort": "感觉",
"humidity": "湿度",
"name": "命名",
"height": "高度",
"lastMeasurement": "最后一次测量",
"week": "周",
"day": "天"
}
20 changes: 15 additions & 5 deletions components/OverviewScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ Default Screen
Author:
Nilusink
*/
import {Text, StyleSheet, View, FlatList, Pressable, TextInput, Dimensions, SafeAreaView, Image} from 'react-native';
import {Text, StyleSheet, View, FlatList, TextInput, Dimensions, SafeAreaView, Image} from 'react-native';
import {getWeatherStations} from "./requesters";
import {getFavourites} from "./storage";
import {useEffect, useState} from "react";
import {StationBox} from "./uiElements";

import { getLocales, getCalendars } from 'expo-localization';
import { getLocales } from 'expo-localization';
// import I18n from "i18n-js";

import de from "../assets/translations/de.json"
import en from "../assets/translations/en.json"
import fr from "../assets/translations/fr.json"
import ro from "../assets/translations/ro.json"
import nl from "../assets/translations/nl.json"
import es from "../assets/translations/es.json"
import zh from "../assets/translations/zh.json"


const MAGNIFIER = require("../assets/magnifying-glass.png");
Expand All @@ -26,12 +31,18 @@ const MAGNIFIER = require("../assets/magnifying-glass.png");
const DEFAULT_LOCALE = "en-US";
const LANGUAGES = {
"de": de,
"en": en
"en": en,
"fr": fr,
"ro": ro,
"nl": nl,
"es": es,
"zh": zh
}
let LANGUAGE = LANGUAGES[DEFAULT_LOCALE];

// assign language
const locales = getLocales();

for (const loc in locales)
{
if (locales[loc].languageTag.slice(0, 2) in LANGUAGES)
Expand Down Expand Up @@ -74,7 +85,7 @@ export default function DefaultScreen({navigation})
}

function entryStyle() {
let out = {
return {
width: "80%",
color: (entryFocus) ? "white" : "#ddd",
marginTop: Dimensions.get('window').height / 60,
Expand All @@ -83,7 +94,6 @@ export default function DefaultScreen({navigation})
borderBottomWidth: 1,
borderColor: "white",
}
return out
}

function IconImage()
Expand Down
2 changes: 1 addition & 1 deletion components/requesters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all the functions for requesting
Author:
Nilusink
*/
const base_url = 'http://home.nilus.ink/'
const base_url = 'http://home.nilus.ink:43210/'


/**
Expand Down
4 changes: 2 additions & 2 deletions components/uiElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,15 @@ export function WeatherGraphs(props)
onPress={setN.bind(this, 288)}
>
<Text style={fancyButton.font}>
1 Tag
1 {language.day}
</Text>
</Pressable>
<Pressable
style={({pressed}) => fancyButtonBox(pressed, n===2016)}
onPress={setN.bind(this, 2016)}
>
<Text style={fancyButton.font}>
1 Woche
1 {language.week}
</Text>
</Pressable>
</View>
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,30 @@
"web": "expo start --web"
},
"dependencies": {
"@expo/webpack-config": "^18.0.1",
"@miblanchard/react-native-slider": "^2.1.0",
"@react-native-async-storage/async-storage": "1.17.11",
"@react-native-masked-view/masked-view": "0.2.8",
"@react-navigation/native": "^6.0.13",
"@react-navigation/native-stack": "^6.9.1",
"expo": "^48.0.0",
"expo-linear-gradient": "~12.1.1",
"expo-linear-gradient": "~12.1.2",
"expo-localization": "~14.1.1",
"expo-status-bar": "~1.4.4",
"expo-system-ui": "~2.2.1",
"expo-updates": "~0.16.3",
"expo-updates": "~0.16.4",
"react": "18.2.0",
"react-native": "0.71.3",
"react-dom": "^18.2.0",
"react-native": "0.71.14",
"react-native-anchor-point": "^1.0.6",
"react-native-chart-kit": "^6.12.0",
"react-native-dropdown-picker": "^5.4.3",
"react-native-maps": "1.3.2",
"react-native-progress": "^5.0.0",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-svg": "13.4.0"
"react-native-svg": "13.4.0",
"react-native-web": "^0.18.12"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
Empty file added yarn-error.log
Empty file.
Loading