From 84ad7303a499613c1345542cfd62b5a1d434a703 Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Mon, 8 Nov 2021 22:13:56 +0100 Subject: [PATCH 01/41] Add back pods --- apps/skolplattformen-sthlm/ios/Podfile.lock | 113 +++++++++++++++++- .../ios/app.xcodeproj/project.pbxproj | 16 ++- apps/skolplattformen-sthlm/package.json | 4 +- package.json | 3 +- yarn.lock | 13 +- 5 files changed, 137 insertions(+), 12 deletions(-) diff --git a/apps/skolplattformen-sthlm/ios/Podfile.lock b/apps/skolplattformen-sthlm/ios/Podfile.lock index 64883f884..fef1aa995 100644 --- a/apps/skolplattformen-sthlm/ios/Podfile.lock +++ b/apps/skolplattformen-sthlm/ios/Podfile.lock @@ -1,5 +1,6 @@ PODS: - boost-for-react-native (1.63.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.65.1) - FBReactNativeSpec (0.65.1): @@ -9,10 +10,71 @@ PODS: - React-Core (= 0.65.1) - React-jsi (= 0.65.1) - ReactCommon/turbomodule/core (= 0.65.1) + - Flipper (0.93.0): + - Flipper-Folly (~> 2.6) + - Flipper-RSocket (~> 1.4) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.1.7) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.7): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.180) + - Flipper-Glog (0.3.6) + - Flipper-PeerTalk (0.0.4) + - Flipper-RSocket (1.4.3): + - Flipper-Folly (~> 2.6) + - FlipperKit (0.93.0): + - FlipperKit/Core (= 0.93.0) + - FlipperKit/Core (0.93.0): + - Flipper (~> 0.93.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - FlipperKit/CppBridge (0.93.0): + - Flipper (~> 0.93.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.93.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.93.0) + - FlipperKit/FKPortForwarding (0.93.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.93.0) + - FlipperKit/FlipperKitLayoutHelpers (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutPlugin (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutTextSearchable (0.93.0) + - FlipperKit/FlipperKitNetworkPlugin (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.93.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.93.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.8.1) - libevent (2.1.12) + - OpenSSL-Universal (1.1.180) - RCT-Folly (2021.04.26.00): - boost-for-react-native - DoubleConversion @@ -350,15 +412,38 @@ PODS: - RNScreens (3.8.0): - React-Core - React-RCTImage - - RNSVG (12.1.0): + - RNSVG (12.1.1): - React - Toast (4.0.0) - Yoga (1.14.0) + - YogaKit (1.18.1): + - Yoga (~> 1.14) DEPENDENCIES: - DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../../../node_modules/react-native/React/FBReactNativeSpec`) + - Flipper (= 0.93.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.1.7) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.7) + - Flipper-Glog (= 0.3.6) + - Flipper-PeerTalk (= 0.0.4) + - Flipper-RSocket (= 1.4.3) + - FlipperKit (= 0.93.0) + - FlipperKit/Core (= 0.93.0) + - FlipperKit/CppBridge (= 0.93.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.93.0) + - FlipperKit/FBDefines (= 0.93.0) + - FlipperKit/FKPortForwarding (= 0.93.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.93.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.93.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.93.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.93.0) + - FlipperKit/FlipperKitReactPlugin (= 0.93.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.93.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.93.0) - glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (~> 0.8.1) - libevent (~> 2.1.12) @@ -409,10 +494,22 @@ DEPENDENCIES: SPEC REPOS: trunk: - boost-for-react-native + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - Flipper-RSocket + - FlipperKit - fmt - hermes-engine - libevent + - OpenSSL-Universal - Toast + - YogaKit EXTERNAL SOURCES: DoubleConversion: @@ -508,13 +605,24 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: 33c82491102f20ecddb6c6a2c273696ace3191e0 FBReactNativeSpec: df8f81d2a7541ee6755a047b398a5cb5a72acd0e + Flipper: b1fddf9a17c32097b2b4c806ad158b2f36bb2692 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 83af37379faa69497529e414bd43fbfc7cae259a + Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 + FlipperKit: aec2d931adeee48a07bab1ea8bcc8a6bb87dfce4 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 5337263514dd6f09803962437687240c5dc39aa4 hermes-engine: 7dcd1dbd908e6353bd7e4a4add72dba7bf76bf84 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b RCT-Folly: 0dd9e1eb86348ecab5ba76f910b56f4b5fef3c46 RCTRequired: 6cf071ab2adfd769014b3d94373744ee6e789530 RCTTypeSafety: b829c59453478bb5b02487b8de3336386ab93ab1 @@ -554,9 +662,10 @@ SPEC CHECKSUMS: RNLocalize: 74b82db20cc3895ccc25af992c644879bcec2815 RNReanimated: ad24db8af24e3fe1b5c462785bc3db8d5baae2ee RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c - RNSVG: ce9d996113475209013317e48b05c21ee988d42e + RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 Yoga: aa0cb45287ebe1004c02a13f279c55a95f1572f4 + YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 85f5a2dfa1de342b427eecb6e9652410ad153247 diff --git a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj index 25214c4ca..d3fb1edd9 100644 --- a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj +++ b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj @@ -573,10 +573,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes/hermes.framework/hermes", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -591,10 +595,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes/hermes.framework/hermes", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -971,7 +979,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1033,7 +1041,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/apps/skolplattformen-sthlm/package.json b/apps/skolplattformen-sthlm/package.json index fb0ad2d7a..e336a5f29 100644 --- a/apps/skolplattformen-sthlm/package.json +++ b/apps/skolplattformen-sthlm/package.json @@ -77,6 +77,8 @@ "valtio": "*", "yup": "*" }, - "devDependencies": {}, + "devDependencies": { + "react-native-clean-project": "*" + }, "private": true } diff --git a/package.json b/package.json index ea32f5157..f6ca7056f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^3.3.0", "react-native-simple-toast": "1.1.3", - "react-native-svg": "12.1.0", + "react-native-svg": "12.1.1", "react-native-typography": "1.4.1", "react-native-webview": "11.4.2", "react-redux": "^7.2.3", @@ -128,6 +128,7 @@ "node-blob": "^0.0.2", "node-fetch": "^2.6.1", "prettier": "^2.3.1", + "react-native-clean-project": "^3.6.7", "react-native-codegen": "0.0.7", "react-native-oss-license": "^0.4.1", "react-native-svg": "12.1.1", diff --git a/yarn.lock b/yarn.lock index 332427549..1f60ea52d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12034,6 +12034,11 @@ react-native-calendar-events@2.2.0: resolved "https://registry.npmjs.org/react-native-calendar-events/-/react-native-calendar-events-2.2.0.tgz" integrity sha512-tNUbhT6Ief0JM4OQzQAaz1ri0+MCcAoHptBcEXCz2g7q3A05pg62PR2Dio4F9t2fCAD7Y2+QggdY1ycAsF3Tsg== +react-native-clean-project@^3.6.7: + version "3.6.7" + resolved "https://registry.yarnpkg.com/react-native-clean-project/-/react-native-clean-project-3.6.7.tgz#6d22ad22fe3a1e6efdb040eb66f9bdfb2273ac2e" + integrity sha512-GSJG1oNRJKtINPMzfHgRmu7HJs7phwgtwQ6GvyGARiySqQlU/bAc5zsI9rOeNPGlpgYongQtjOGdmqSpsWMJTw== + react-native-codegen@0.0.7: version "0.0.7" resolved "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.0.7.tgz" @@ -12163,10 +12168,10 @@ react-native-svg-transformer@0.14.3: path-dirname "^1.0.2" semver "^5.6.0" -react-native-svg@12.1.0: - version "12.1.0" - resolved "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.0.tgz" - integrity sha512-1g9qBRci7man8QsHoXn6tP3DhCDiypGgc6+AOWq+Sy+PmP6yiyf8VmvKuoqrPam/tf5x+ZaBT2KI0gl7bptZ7w== +react-native-svg@12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-12.1.1.tgz#5f292410b8bcc07bbc52b2da7ceb22caf5bcaaee" + integrity sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q== dependencies: css-select "^2.1.0" css-tree "^1.0.0-alpha.39" From c081a1200837fc77ce15526b867fc28340babcd1 Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Mon, 8 Nov 2021 22:14:16 +0100 Subject: [PATCH 02/41] Change entry file According to https://blog.nrwl.io/introducing-react-native-support-for-nx-48d335e90c89 --- .../skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj | 2 +- index.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 index.js diff --git a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj index d3fb1edd9..48bc4c770 100644 --- a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj +++ b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj @@ -462,7 +462,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "export NODE_BINARY=node\nexport ENTRY_FILE=./apps/my-native-app/index.js\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; 0D9913ADEC9198115BFBE990 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/index.js b/index.js deleted file mode 100644 index e459c00ae..000000000 --- a/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import 'react-native-gesture-handler' -import { AppRegistry } from 'react-native' -import App from './apps/skolplattformen-sthlm/App' -import { name as appName } from './apps/skolplattformen-sthlm/app.json' - -AppRegistry.registerComponent(appName, () => App) From 35a903813ae47e99cefc6f2666f3e359d3d8ec9d Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Mon, 8 Nov 2021 22:47:51 +0100 Subject: [PATCH 03/41] Change path --- apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj index 48bc4c770..b1751bb0d 100644 --- a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj +++ b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj @@ -462,7 +462,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\nexport ENTRY_FILE=./apps/my-native-app/index.js\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "export NODE_BINARY=node\nexport ENTRY_FILE=./apps/skolplattformen-sthlm/index.js\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; 0D9913ADEC9198115BFBE990 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; From 0f9694d1ffe7172e1f29fdf1dd06351c291df65a Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Tue, 9 Nov 2021 00:45:04 +0100 Subject: [PATCH 04/41] Updated Bundle React Native code and images with arguments for finding index.js Used this: https://github.com/facebook/react-native/issues/31282#issuecomment-824962207 --- .../ios/app.xcodeproj/project.pbxproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj index b1751bb0d..a39009e5f 100644 --- a/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj +++ b/apps/skolplattformen-sthlm/ios/app.xcodeproj/project.pbxproj @@ -462,7 +462,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\nexport ENTRY_FILE=./apps/skolplattformen-sthlm/index.js\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "export NODE_BINARY=node\nexport ENTRY_FILE=index.js\nexport EXTRA_PACKAGER_ARGS=\"--entry-file apps/skolplattformen-sthlm/index.js\"\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; 0D9913ADEC9198115BFBE990 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -815,11 +815,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 164; - DEVELOPMENT_TEAM = 76DV673YHX; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = app/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 2.0.4; @@ -830,7 +830,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = se.kolplattformen.app; PRODUCT_NAME = app; - PROVISIONING_PROFILE_SPECIFIER = "Skolplattformen App Store Development"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; From 7c5098859b71f13ffdb9441b81e149b983355d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Edenstr=C3=B6m?= Date: Fri, 12 Nov 2021 09:39:01 +0100 Subject: [PATCH 05/41] fix: images cropping on different devices (#524) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add image sizes using Image.getSizeWithHeaders * chore: 🤖 bild i fakeData * add rounded corners to embedded images in content * add debug information * add more debug info Co-authored-by: Kajetan Kazimierczak --- .../components/image.component.tsx | 99 ++++++++++++++++--- .../components/markdown.component.tsx | 8 +- .../components/newsItem.component.tsx | 7 +- .../components/newsListItem.component.tsx | 12 ++- libs/api-skolplattformen/lib/fakeData.ts | 2 +- 5 files changed, 103 insertions(+), 25 deletions(-) diff --git a/apps/skolplattformen-sthlm/components/image.component.tsx b/apps/skolplattformen-sthlm/components/image.component.tsx index 32b05e486..2b17b1eb4 100644 --- a/apps/skolplattformen-sthlm/components/image.component.tsx +++ b/apps/skolplattformen-sthlm/components/image.component.tsx @@ -1,39 +1,108 @@ import { useApi } from '@skolplattformen/hooks' -import React, { useEffect, useState } from 'react' -import { Image as ImageBase, ImageStyle, StyleProp } from 'react-native' +import React, { useCallback, useEffect, useState } from 'react' +import { + Image as ImageBase, + ImageResizeMode, + ImageStyle, + StyleProp, + useWindowDimensions, + View, +} from 'react-native' interface ImageProps { src: string style: StyleProp + /** + * Width of component. Defaults to window width + * Used to automatically calculate width + */ + componentWidth?: number accessibilityIgnoresInvertColors: boolean + resizeMode?: ImageResizeMode + width?: number + height?: number } export const Image = ({ src, style, + componentWidth = 0, accessibilityIgnoresInvertColors, + resizeMode = 'contain', }: ImageProps) => { const { api } = useApi() const [headers, setHeaders] = useState() + const { width: windowWidth } = useWindowDimensions() + const [dimensions, setDimensions] = useState({ width: 0, height: 0 }) - const getHeaders = async (url: string) => { - const { headers: newHeaders } = await api.getSession(url) - setHeaders(newHeaders) - } + const debugImageName = getDebugImageName(src) + + const prefetchImageInformation = useCallback( + async (url: string) => { + if (!url) return + const { headers: newHeaders } = await api.getSession(url) + + console.log('[IMAGE] Getting image dimensions with headers', { + debugImageName, + newHeaders, + }) + + ImageBase.getSizeWithHeaders( + url, + newHeaders, + (w, h) => { + console.log('[IMAGE] Received image dimensions', { + debugImageName, + w, + h, + }) + setDimensions({ width: w, height: h }) + setHeaders(newHeaders) + }, + (error) => { + console.error('[Image] Failed to get image dimensions', { + debugImageName, + error, + }) + } + ) + }, + [api, debugImageName] + ) useEffect(() => { - getHeaders(src) - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [src]) + prefetchImageInformation(src) + }, [prefetchImageInformation, src]) + + const compWidth = componentWidth || windowWidth - return headers ? ( + const scale = compWidth / dimensions.width + const scaledWidth = Math.round(dimensions.width * scale) + const scaledHeight = Math.round(dimensions.height * scale) + + const imageSource = + resizeMode === 'cover' + ? { uri: src, headers } + : { uri: src, headers, height: scaledHeight, width: scaledWidth } + + return headers && scaledWidth && scaledHeight ? ( - ) : null + ) : ( + + ) +} + +const getDebugImageName = (src: string) => { + try { + const split = src.split('/') + return split[split.length - 1] + } catch (e: any) { + console.log('FAILED', e.message) + return null + } } diff --git a/apps/skolplattformen-sthlm/components/markdown.component.tsx b/apps/skolplattformen-sthlm/components/markdown.component.tsx index 78406a16c..5e10d02c9 100644 --- a/apps/skolplattformen-sthlm/components/markdown.component.tsx +++ b/apps/skolplattformen-sthlm/components/markdown.component.tsx @@ -1,7 +1,8 @@ import { Text } from '@ui-kitten/components' import React from 'react' -import { Linking, StyleSheet } from 'react-native' +import { Dimensions, Linking, StyleSheet } from 'react-native' import MarkdownBase, { RenderRules } from 'react-native-markdown-display' +import { Sizing } from '../styles' import { Image } from './image.component' interface MarkdownProps { @@ -20,6 +21,9 @@ const rules: RenderRules = { accessibilityIgnoresInvertColors key={src} src={url} + // TODO: Sizing.t5 should not be hardcoded here... + // Maybe measure the width from inside the component instead? + componentWidth={Dimensions.get('window').width - Sizing.t5 * 2} style={styles.markdownImage} /> ) @@ -52,5 +56,5 @@ export const Markdown = ({ style, children }: MarkdownProps) => { } const styles = StyleSheet.create({ - markdownImage: { width: '100%', minHeight: 300 }, + markdownImage: { width: '100%', borderRadius: 15 }, }) diff --git a/apps/skolplattformen-sthlm/components/newsItem.component.tsx b/apps/skolplattformen-sthlm/components/newsItem.component.tsx index edbd006e1..da3d8cfa8 100644 --- a/apps/skolplattformen-sthlm/components/newsItem.component.tsx +++ b/apps/skolplattformen-sthlm/components/newsItem.component.tsx @@ -5,7 +5,7 @@ import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' import moment from 'moment' import 'moment/locale/sv' import React from 'react' -import { ScrollView, View } from 'react-native' +import { Dimensions, ImageStyle, ScrollView, View } from 'react-native' import { NativeStackNavigationOptions } from 'react-native-screens/native-stack' import { defaultStackStyling } from '../design/navigationThemes' import { Layout, Sizing, Typography } from '../styles' @@ -79,8 +79,8 @@ export const NewsItem = ({ route }: NewsItemProps) => { )} @@ -119,7 +119,6 @@ const themedStyles = StyleService.create({ }, image: { width: '100%', - minHeight: 300, marginTop: Sizing.t4, borderRadius: 15, }, diff --git a/apps/skolplattformen-sthlm/components/newsListItem.component.tsx b/apps/skolplattformen-sthlm/components/newsListItem.component.tsx index 5066a3dea..226d66866 100644 --- a/apps/skolplattformen-sthlm/components/newsListItem.component.tsx +++ b/apps/skolplattformen-sthlm/components/newsListItem.component.tsx @@ -4,7 +4,13 @@ import { NewsItem } from '@skolplattformen/api-skolplattformen' import { StyleService, useStyleSheet } from '@ui-kitten/components' import moment from 'moment' import React, { ReactNode } from 'react' -import { Dimensions, Text, TouchableOpacity, View } from 'react-native' +import { + Dimensions, + ImageStyle, + Text, + TouchableOpacity, + View, +} from 'react-native' import { Layout, Sizing, Typography } from '../styles' import { useChild } from './childContext.component' import { Image } from './image.component' @@ -39,8 +45,8 @@ export const NewsListItem = ({ item, children }: NewsListItemProps) => { ) : null} diff --git a/libs/api-skolplattformen/lib/fakeData.ts b/libs/api-skolplattformen/lib/fakeData.ts index 0b2a32ffe..731905336 100644 --- a/libs/api-skolplattformen/lib/fakeData.ts +++ b/libs/api-skolplattformen/lib/fakeData.ts @@ -810,7 +810,7 @@ const data: any = { intro: 'Vi kommer efter att förskoleklassen är slut arrangera olika vinteraktiviteter genom fridtidsverksamheten.', body: - '## Vänligen ta med hjälm, skridskor eller stjärtlapp. Alla barn måste ha hjälm på sig samt varma kläder. Vi kommer åka i backen bakom skolbyggnaden samt använda isen som spolats vid Mullsjöskolan. Personal kommer finnas på plats samt att vi erbjuda varm dryck, frukt och lek för de barn som ej har hjälm eller lämpligt åkdon.', + '## Vänligen ta med hjälm, skridskor eller stjärtlapp.\n\n ![Bild](https://images.unsplash.com/photo-1495377701095-00261b767581?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=988&q=80)\n\n Alla barn måste ha hjälm på sig samt varma kläder. Vi kommer åka i backen bakom skolbyggnaden samt använda isen som spolats vid Mullsjöskolan. Personal kommer finnas på plats samt att vi erbjuda varm dryck, frukt och lek för de barn som ej har hjälm eller lämpligt åkdon.', imageUrl: '6607f9b923edb6f85aa4417bab43c0f8.jpg', fullImageUrl: 'https://unsplash.com/photos/yB_aiAWkm40', imageAltText: 'Nyhetsbild. Bildtext ej tillgänglig.', From 4c58809ae65a4d179a1175cb9412e1b519b96c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20=C3=96brink?= Date: Mon, 15 Nov 2021 21:50:17 +0100 Subject: [PATCH 06/41] Update README.md Added artwork attribution --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1fbd0a095..592fc048c 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ If you're offended by this initiative, rest assured there is no reason to be — - [Viktor Sarström](https://github.com/viktorlarsson) - [Andreas Eriksson](https://github.com/whyer) - [Kajetan Kazimierczak](https://github.com/kajetan-kazimierczak) +- [Karin Nygårds (artwork)](https://github.com/grishund) - You? ## License From d24347f27226273d68089ed508a73dd75a92d4da Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Mon, 15 Nov 2021 23:36:26 +0100 Subject: [PATCH 07/41] refactor: Fix typescript build errors (#539) --- .../components/absence.component.tsx | 3 +-- .../components/auth.component.tsx | 1 - .../components/child.component.tsx | 2 ++ .../components/classmates.component.tsx | 4 ++-- apps/skolplattformen-sthlm/tsconfig.app.json | 13 ++++++++++++- apps/skolplattformen-sthlm/tsconfig.json | 1 + apps/skolplattformen-sthlm/utils/{SMS.js => SMS.ts} | 0 libs/api-skolplattformen/lib/api.ts | 4 ++-- 8 files changed, 20 insertions(+), 8 deletions(-) rename apps/skolplattformen-sthlm/utils/{SMS.js => SMS.ts} (100%) diff --git a/apps/skolplattformen-sthlm/components/absence.component.tsx b/apps/skolplattformen-sthlm/components/absence.component.tsx index fb4647123..011f5bdb5 100644 --- a/apps/skolplattformen-sthlm/components/absence.component.tsx +++ b/apps/skolplattformen-sthlm/components/absence.component.tsx @@ -20,7 +20,6 @@ import { defaultStackStyling } from '../design/navigationThemes' import usePersonalStorage from '../hooks/usePersonalStorage' import { Layout as LayoutStyle, Sizing, Typography } from '../styles' import { studentName } from '../utils/peopleHelpers' -// @ts-expect-error Fix when migrating to TSX import { useSMS } from '../utils/SMS' import { translate } from '../utils/translation' import { AlertIcon } from './icon.component' @@ -240,7 +239,7 @@ const Absence = () => { )} - diff --git a/apps/skolplattformen-sthlm/components/auth.component.tsx b/apps/skolplattformen-sthlm/components/auth.component.tsx index 9b382f719..9b340406e 100644 --- a/apps/skolplattformen-sthlm/components/auth.component.tsx +++ b/apps/skolplattformen-sthlm/components/auth.component.tsx @@ -33,7 +33,6 @@ const randomWord = ( const randomIndex: number = Math.floor(Math.random() * keys.length) const argumentKey: string = keys[randomIndex] - // @ts-expect-error Fix this later return words[argumentKey] } diff --git a/apps/skolplattformen-sthlm/components/child.component.tsx b/apps/skolplattformen-sthlm/components/child.component.tsx index 3b87597b7..03146ef34 100644 --- a/apps/skolplattformen-sthlm/components/child.component.tsx +++ b/apps/skolplattformen-sthlm/components/child.component.tsx @@ -125,6 +125,8 @@ const getRouteTitleFromName = (routeName: string) => { return translate('navigation.menu') case 'Classmates': return translate('navigation.classmates') + default: + return '' } } diff --git a/apps/skolplattformen-sthlm/components/classmates.component.tsx b/apps/skolplattformen-sthlm/components/classmates.component.tsx index cd0b60a81..5d85dd589 100644 --- a/apps/skolplattformen-sthlm/components/classmates.component.tsx +++ b/apps/skolplattformen-sthlm/components/classmates.component.tsx @@ -26,7 +26,7 @@ export const Classmates = () => { const renderItemIcon = (props: IconProps) => ( ) - const [selected, setSelected] = React.useState() + const [selected, setSelected] = React.useState() const renderItem = ({ item, index }: ListRenderItemInfo) => ( { setSelected(undefined)} /> )} /> diff --git a/apps/skolplattformen-sthlm/tsconfig.app.json b/apps/skolplattformen-sthlm/tsconfig.app.json index d25e0515d..a9a0fbb5b 100644 --- a/apps/skolplattformen-sthlm/tsconfig.app.json +++ b/apps/skolplattformen-sthlm/tsconfig.app.json @@ -4,6 +4,17 @@ "outDir": "../../dist/out-tsc", "types": ["node"] }, - "exclude": ["**/*.spec.ts", "**/*.spec.tsx"], + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.spec.js", + "**/*.spec.jsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.test.js", + "**/*.test.jsx", + "**/*.tests.ts", + "**/test-setup.ts" + ], "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"] } diff --git a/apps/skolplattformen-sthlm/tsconfig.json b/apps/skolplattformen-sthlm/tsconfig.json index 176f8361c..eb327cf71 100644 --- a/apps/skolplattformen-sthlm/tsconfig.json +++ b/apps/skolplattformen-sthlm/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "allowSyntheticDefaultImports": true, + "noImplicitAny": false, "jsx": "react-native", "lib": ["dom", "esnext"], "moduleResolution": "node", diff --git a/apps/skolplattformen-sthlm/utils/SMS.js b/apps/skolplattformen-sthlm/utils/SMS.ts similarity index 100% rename from apps/skolplattformen-sthlm/utils/SMS.js rename to apps/skolplattformen-sthlm/utils/SMS.ts diff --git a/libs/api-skolplattformen/lib/api.ts b/libs/api-skolplattformen/lib/api.ts index 7ddb69dd6..87817a9ee 100644 --- a/libs/api-skolplattformen/lib/api.ts +++ b/libs/api-skolplattformen/lib/api.ts @@ -295,9 +295,9 @@ export class Api extends EventEmitter { public async getNewsDetails( child: EtjanstChild, item: NewsItem - ): Promise { + ): Promise { if (this.isFake) { - return fakeResponse(fake.news(child).find((ni) => ni.id === item.id)) + return fakeResponse(fake.news(child).find((ni) => ni.id === item.id) || {id: "", published: ""}) } const url = routes.newsDetails(child.id, item.id) const session = this.getRequestInit() From 826e198cc41574c3c4c2aea7d55cb2457dd2b517 Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Mon, 15 Nov 2021 23:48:04 +0100 Subject: [PATCH 08/41] =?UTF-8?q?test:=20=F0=9F=92=8D=20Remove=20warnings?= =?UTF-8?q?=20about=20timers=20not=20beeing=20mocked=20(#540)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The jest.advanceTimersToNextTimer() is not needed by the tests, they pass without it. The reason the warnings was not seen before was because we used an older version of jest (26) before. Now with NX we use 27. --- libs/hooks/src/useCalendar.test.js | 4 ---- libs/hooks/src/useChildList.test.js | 4 ---- libs/hooks/src/useClassmates.test.js | 4 ---- libs/hooks/src/useEtjanstChildren.test.js | 4 ---- libs/hooks/src/useMenu.test.js | 4 ---- libs/hooks/src/useNews.test.js | 4 ---- libs/hooks/src/useNewsDetails.test.js | 4 ---- libs/hooks/src/useNotifications.test.js | 4 ---- libs/hooks/src/useSchedule.test.js | 4 ---- libs/hooks/src/useSkola24Children.test.js | 4 ---- libs/hooks/src/useTimetable.test.js | 4 ---- libs/hooks/src/useUser.test.js | 4 ---- 12 files changed, 48 deletions(-) diff --git a/libs/hooks/src/useCalendar.test.js b/libs/hooks/src/useCalendar.test.js index 7d692751d..d1e203f76 100644 --- a/libs/hooks/src/useCalendar.test.js +++ b/libs/hooks/src/useCalendar.test.js @@ -191,8 +191,6 @@ describe('useCalendar(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -222,8 +220,6 @@ describe('useCalendar(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useChildList.test.js b/libs/hooks/src/useChildList.test.js index db5202bbe..a0d970514 100644 --- a/libs/hooks/src/useChildList.test.js +++ b/libs/hooks/src/useChildList.test.js @@ -223,8 +223,6 @@ describe('useChildList()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual(echildrenCache) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -264,8 +262,6 @@ describe('useChildList()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual(echildrenCache) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useClassmates.test.js b/libs/hooks/src/useClassmates.test.js index 75d085af3..d00074778 100644 --- a/libs/hooks/src/useClassmates.test.js +++ b/libs/hooks/src/useClassmates.test.js @@ -176,8 +176,6 @@ describe('useClassmates(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -207,8 +205,6 @@ describe('useClassmates(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useEtjanstChildren.test.js b/libs/hooks/src/useEtjanstChildren.test.js index 883ddd5e1..a70ff0586 100644 --- a/libs/hooks/src/useEtjanstChildren.test.js +++ b/libs/hooks/src/useEtjanstChildren.test.js @@ -174,8 +174,6 @@ describe('useEtjanstChildren()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -205,8 +203,6 @@ describe('useEtjanstChildren()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useMenu.test.js b/libs/hooks/src/useMenu.test.js index a643bd444..60ac912ac 100644 --- a/libs/hooks/src/useMenu.test.js +++ b/libs/hooks/src/useMenu.test.js @@ -172,8 +172,6 @@ describe('useMenu(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -202,8 +200,6 @@ describe('useMenu(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useNews.test.js b/libs/hooks/src/useNews.test.js index 4d5520e40..c8c19e4a7 100644 --- a/libs/hooks/src/useNews.test.js +++ b/libs/hooks/src/useNews.test.js @@ -172,8 +172,6 @@ describe('useNews(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -202,8 +200,6 @@ describe('useNews(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useNewsDetails.test.js b/libs/hooks/src/useNewsDetails.test.js index 25a5c753b..4bb718f13 100644 --- a/libs/hooks/src/useNewsDetails.test.js +++ b/libs/hooks/src/useNewsDetails.test.js @@ -192,8 +192,6 @@ describe('useNewsDetails(child, newsItem)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual({ ...cached }) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -223,8 +221,6 @@ describe('useNewsDetails(child, newsItem)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual({ ...cached }) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useNotifications.test.js b/libs/hooks/src/useNotifications.test.js index 4e1f6df5f..e6d146482 100644 --- a/libs/hooks/src/useNotifications.test.js +++ b/libs/hooks/src/useNotifications.test.js @@ -176,8 +176,6 @@ describe('useNotifications(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -207,8 +205,6 @@ describe('useNotifications(child)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useSchedule.test.js b/libs/hooks/src/useSchedule.test.js index 5df4ac3de..7397b1924 100644 --- a/libs/hooks/src/useSchedule.test.js +++ b/libs/hooks/src/useSchedule.test.js @@ -192,8 +192,6 @@ describe('useSchedule(child, from, to)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -223,8 +221,6 @@ describe('useSchedule(child, from, to)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useSkola24Children.test.js b/libs/hooks/src/useSkola24Children.test.js index 292ba7f21..b0fb65b7f 100644 --- a/libs/hooks/src/useSkola24Children.test.js +++ b/libs/hooks/src/useSkola24Children.test.js @@ -178,8 +178,6 @@ describe('useSkola24Children()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ personGuid: '2' }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -209,8 +207,6 @@ describe('useSkola24Children()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ personGuid: '2' }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useTimetable.test.js b/libs/hooks/src/useTimetable.test.js index b08ea5275..c2709996e 100644 --- a/libs/hooks/src/useTimetable.test.js +++ b/libs/hooks/src/useTimetable.test.js @@ -191,8 +191,6 @@ describe('useTimetable(child, week, year, lang)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -222,8 +220,6 @@ describe('useTimetable(child, week, year, lang)', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual([{ id: 2 }]) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() diff --git a/libs/hooks/src/useUser.test.js b/libs/hooks/src/useUser.test.js index efe2c80a8..718888547 100644 --- a/libs/hooks/src/useUser.test.js +++ b/libs/hooks/src/useUser.test.js @@ -162,8 +162,6 @@ describe('useUser()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual({ id: 2 }) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() @@ -192,8 +190,6 @@ describe('useUser()', () => { expect(result.current.status).toEqual('loading') expect(result.current.data).toEqual({ id: 2 }) - jest.advanceTimersToNextTimer() - await waitForNextUpdate() await waitForNextUpdate() await waitForNextUpdate() From 4e2309ccbdf6d6ae17a50d5294ebfb7c14e2053e Mon Sep 17 00:00:00 2001 From: webberian Date: Tue, 12 Oct 2021 21:10:28 +0000 Subject: [PATCH 09/41] Translated using Weblate (English) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/en/ --- apps/skolplattformen-sthlm/translations/en.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/en.json b/apps/skolplattformen-sthlm/translations/en.json index 060e7bb5c..6885878dc 100644 --- a/apps/skolplattformen-sthlm/translations/en.json +++ b/apps/skolplattformen-sthlm/translations/en.json @@ -103,7 +103,6 @@ "language": "Language", "themeAuto": "Auto", "useSystemTheme": "Use System Light/Dark Theme" - }, "themes": { "light": "Light", @@ -140,6 +139,6 @@ "call": "Call", "sms": "SMS", "email": "E-mail", - "home": "Home" + "home": "Address" } } From f60086891fab3ea58ccb858fcc7d8e5ad405fe15 Mon Sep 17 00:00:00 2001 From: webberian Date: Tue, 12 Oct 2021 21:05:16 +0000 Subject: [PATCH 10/41] Translated using Weblate (German) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/de/ --- .../translations/de.json | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/de.json b/apps/skolplattformen-sthlm/translations/de.json index 4e473e729..841679dcf 100644 --- a/apps/skolplattformen-sthlm/translations/de.json +++ b/apps/skolplattformen-sthlm/translations/de.json @@ -76,7 +76,9 @@ "settings": "Einstellungen", "socialSecurityNumber": "Personenkennziffer", "title": "Öppna skolplattformen", - "cancel": "Abbrechen" + "cancel": "Abbrechen", + "logoutAndClearPersonalData": "Ausloggen und persönliche Daten löschen", + "logoutAndClearAllDataInclSettings": "Ausloggen und alle Daten inkl. Einstellungen löschen" }, "language": { "changeLanguage": "Sprache ändern", @@ -94,7 +96,7 @@ "classmates": "Mitschüler" }, "news": { - "backToChild": "Zurück zu Kind", + "backToChild": "Zurück zum Kind", "noNewNewsItemsThisWeek": "Keine neuen Nachrichten diese Woche.", "notificationTitle": "Nachricht: {{header}} ({{published}})", "published": "Veröffentlicht", @@ -108,22 +110,35 @@ "notificationTitle": "Mitteilung: {{message}} ({{dateCreated}})" }, "schedule": { - "gymBag": "Sporttasche", + "gymBag": "Turnbeutel", "lunch": "Mittagessen", "end": "Ende", "start": "Anfang" }, "contact": { "a11y_show_contact_info_button_hint": "Zeigt Kontaktinformation an", - "home": "Heim", + "home": "Adresse", "email": "E-Mail", "sms": "SMS", "call": "Anrufen", "a11y_show_contact_info_button_label": "Kontaktinformationen anzeigen" }, "classmates": { - "contactsForGuardiansFor": "Kontaktinformationen der Erziehungsberechtigte für", + "contactsForGuardiansFor": "Kontaktinformationen der Erziehungsberechtigten für", "child": "Kind", "class": "Klasse" + }, + "settings": { + "appearance": "Modus", + "licenses": "Lizenzen", + "language": "Sprache", + "themeAuto": "Automatisch", + "useSystemTheme": "Systemmodus benutzen", + "settings": "Einstellungen", + "theme": "Modus" + }, + "themes": { + "light": "Hell", + "dark": "Dunkel" } } From 7db1098c083c9676fcc2935937b8db4b1c89f185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Tue, 12 Oct 2021 15:22:42 +0000 Subject: [PATCH 11/41] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 99.0% (103 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/nb_NO/ --- .../translations/nb_NO.json | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/nb_NO.json b/apps/skolplattformen-sthlm/translations/nb_NO.json index ec67ea630..0f5ec4d45 100644 --- a/apps/skolplattformen-sthlm/translations/nb_NO.json +++ b/apps/skolplattformen-sthlm/translations/nb_NO.json @@ -60,7 +60,9 @@ "changeLanguage": "Endre språk", "settings": "Innstillinger", "send": "Send", - "cancel": "Avbryt" + "cancel": "Avbryt", + "logoutAndClearPersonalData": "Logg ut og tøm personlig data", + "logoutAndClearAllDataInclSettings": "Logg ut og tøm all data, inkludert innstillinger" }, "news": { "updated": "Oppdatert", @@ -96,7 +98,8 @@ "notifications": "Merknader", "news": "Nyheter", "menu": "Meny", - "calender": "Kalender" + "calender": "Kalender", + "classmates": "Klassekamerater" }, "menu": { "emptyText": "Fant ikke noe denne uken", @@ -113,6 +116,27 @@ "start": "Start" }, "contact": { - "a11y_show_contact_info_button_hint": "Vis kontaktinfo" + "a11y_show_contact_info_button_hint": "Vis kontaktinfo", + "call": "Ring", + "a11y_show_contact_info_button_label": "Vis kontaktinfo", + "sms": "SMS", + "email": "E-post", + "home": "Hjem" + }, + "classmates": { + "contactsForGuardiansFor": "Foresattes kontaktinfo for", + "class": "Klasse", + "child": "Barn" + }, + "settings": { + "settings": "Innstillinger", + "appearance": "Utseende", + "themeAuto": "Auto", + "theme": "Drakt", + "language": "Språk" + }, + "themes": { + "light": "Lys", + "dark": "Mørk" } } From c9b517b7fb574895214148a877afb00545abaa55 Mon Sep 17 00:00:00 2001 From: Luna Jernberg Date: Thu, 21 Oct 2021 08:04:17 +0000 Subject: [PATCH 12/41] Translated using Weblate (Swedish) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/sv/ --- apps/skolplattformen-sthlm/translations/sv.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/translations/sv.json b/apps/skolplattformen-sthlm/translations/sv.json index 5983ecee2..3a19ec0cc 100644 --- a/apps/skolplattformen-sthlm/translations/sv.json +++ b/apps/skolplattformen-sthlm/translations/sv.json @@ -139,6 +139,6 @@ "call": "Ring", "sms": "SMS", "email": "Maila", - "home": "Hem" + "home": "Adress" } } From 99b42c0859844d024482830737fb033cef4afad4 Mon Sep 17 00:00:00 2001 From: SC Date: Mon, 8 Nov 2021 20:07:11 +0100 Subject: [PATCH 13/41] Added translation using Weblate (Portuguese) --- apps/skolplattformen-sthlm/translations/pt.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/skolplattformen-sthlm/translations/pt.json diff --git a/apps/skolplattformen-sthlm/translations/pt.json b/apps/skolplattformen-sthlm/translations/pt.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/apps/skolplattformen-sthlm/translations/pt.json @@ -0,0 +1 @@ +{} From 6a96cdca93f31f3d0414228b43edb21681c81676 Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Wed, 10 Nov 2021 07:51:11 +0100 Subject: [PATCH 14/41] Added translation using Weblate (Chinese (Simplified)) --- apps/skolplattformen-sthlm/translations/zh_Hans.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/skolplattformen-sthlm/translations/zh_Hans.json diff --git a/apps/skolplattformen-sthlm/translations/zh_Hans.json b/apps/skolplattformen-sthlm/translations/zh_Hans.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/apps/skolplattformen-sthlm/translations/zh_Hans.json @@ -0,0 +1 @@ +{} From d4ea6b197897befc09b73565282b1f40e1ec896a Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Wed, 10 Nov 2021 06:53:08 +0000 Subject: [PATCH 15/41] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/zh_Hans/ --- .../translations/zh_Hans.json | 145 +++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/translations/zh_Hans.json b/apps/skolplattformen-sthlm/translations/zh_Hans.json index 0967ef424..20d9f5350 100644 --- a/apps/skolplattformen-sthlm/translations/zh_Hans.json +++ b/apps/skolplattformen-sthlm/translations/zh_Hans.json @@ -1 +1,144 @@ -{} +{ + "abbrevations": { + "preSchool": "学前班", + "upperSecondarySchool": "高中", + "compulsorySchool": "小学/初中", + "leisureTimeCentre": "课后托管" + }, + "abscense": { + "endTime": "结束时间", + "entireDay": "全天", + "selectAbscenseEndTime": "选择结束时间", + "selectAbscenseStartTime": "选择开始时间", + "title": "报告缺席情况", + "invalidPersonalNumber": "个人身份号码无效", + "personalNumberMissing": "缺少个人身份号码", + "startTime": "开始时间" + }, + "auth": { + "bankid": { + "OpenManually": "手动打开 BankID", + "OpenOnAnotherDevice": "在另一台设备上打开 BankID", + "OpenOnThisDevice": "在本设备上打开 BankID", + "Waiting": "正在等待 BankID 响应…" + }, + "loginAsTestUser": "以测试用户身份登录", + "loginFailed": "无法登录。请重试。", + "placeholder_SocialSecurityNumber": "你的个人身份号码", + "words": { + "agile": "轻快", + "awaited": "久违", + "better": "更佳", + "cheap": "价廉", + "cooler": "酷乐", + "enlightened": "开明", + "fantastic": "匪夷", + "fast": "迅捷", + "free": "自由", + "fun": "乐趣", + "homemade": "手制", + "open": "开放", + "rebellious": "逆流", + "simple": "简单", + "imperfect": "有瑕", + "first": "一流", + "working": "可用" + }, + "subtitle": "{{word}}之选", + "a11y_clear_social_security_input_field": "清空个人身份号码栏", + "chooseLoginMethod": "选择登录方式", + "a11y_change_language": "选择您的语言", + "a11y_image_two_boys": "两个人看手机的图片", + "a11y_select_login_method": "选择登录方式" + }, + "calender": { + "saveToCalender": "保存到日历中", + "saveToCalenderError": "出了点问题", + "saveToCalenderSuccess": "✔️ 已保存到日历中", + "showCalenderActions": "显示日历操作", + "approveAccessToCalender": "您必须允许访问日历" + }, + "children": { + "loadingErrorHeading": "啊噢!", + "loadingErrorInformationText": "这个页面无法加载。请重试或在 skolplattformen.org 网站上查看当前状态。", + "noKids_title": "没有找到孩子", + "title": "您的孩子", + "tryAgain": "请重试", + "viewStatus": "在 skolplattformen.org 网站上查看状态", + "noKids_description": "您的个人身份号码下没有注册在斯德哥尔摩市的孩子" + }, + "general": { + "cancel": "取消", + "changeLanguage": "更改语言", + "confirm": "确认", + "loading": "正在加载…", + "logout": "登出", + "logoutAndClearPersonalData": "登出并清除个人数据", + "logoutAndClearAllDataInclSettings": "登出并清除包括设置在内的所有数据", + "send": "发送", + "socialSecurityNumber": "个人身份号码", + "title": "开放学校平台", + "settings": "设置" + }, + "language": { + "changeLanguage": "更改语言", + "changeLanguageButton": "保存" + }, + "menu": { + "emptyHeadline": "午餐菜单看起来有点空", + "emptyText": "找不到有关这个星期的任何内容" + }, + "navigation": { + "calender": "日历", + "menu": "午餐", + "news": "新闻", + "notifications": "通知", + "classmates": "同班同学" + }, + "settings": { + "appearance": "外观", + "licenses": "许可证", + "language": "语言", + "themeAuto": "自动", + "useSystemTheme": "使用系统亮色/暗色主题", + "settings": "设置", + "theme": "主题" + }, + "themes": { + "light": "亮色", + "dark": "暗色" + }, + "news": { + "backToChild": "返回到孩子页面", + "noNewNewsItemsThisWeek": "这个星期没有新闻。", + "notificationTitle": "新闻:{{header}}({{published}})", + "published": "已发布", + "updated": "已更新", + "search": { + "placeholder": "在新闻中搜索…" + }, + "title": "来自学校平台的新闻" + }, + "notifications": { + "notificationTitle": "通知:{{message}}({{dateCreated}})" + }, + "schedule": { + "start": "开始", + "end": "结束", + "lunch": "午餐", + "gymBag": "健身袋" + }, + "classmates": { + "class": "课堂", + "child": "孩子", + "contactsForGuardiansFor": "监护人的联系信息" + }, + "contact": { + "a11y_show_contact_info_button_hint": "显示联系信息", + "a11y_show_contact_info_button_label": "显示联系信息", + "sms": "短信", + "call": "电话", + "email": "电子邮箱", + "home": "家庭地址" + } +} From 967090324280e580858318fe70579eb76e1e3a2e Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Wed, 10 Nov 2021 10:00:21 +0100 Subject: [PATCH 16/41] Added translation using Weblate (Chinese (Traditional)) --- apps/skolplattformen-sthlm/translations/zh_Hant.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/skolplattformen-sthlm/translations/zh_Hant.json diff --git a/apps/skolplattformen-sthlm/translations/zh_Hant.json b/apps/skolplattformen-sthlm/translations/zh_Hant.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/apps/skolplattformen-sthlm/translations/zh_Hant.json @@ -0,0 +1 @@ +{} From 6e5fd3cd80ee802609e523d2a8cc7e0f7aeced1e Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Tue, 9 Nov 2021 20:39:23 +0000 Subject: [PATCH 17/41] Translated using Weblate (French) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/fr/ --- .../translations/fr.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/fr.json b/apps/skolplattformen-sthlm/translations/fr.json index c6de0f409..95e431066 100644 --- a/apps/skolplattformen-sthlm/translations/fr.json +++ b/apps/skolplattformen-sthlm/translations/fr.json @@ -8,7 +8,9 @@ "logout": "Se déconnecter", "confirm": "Confirmer", "changeLanguage": "Changer de langue", - "cancel": "Annuler" + "cancel": "Annuler", + "logoutAndClearPersonalData": "Se déconnecter et effacer les données personnelles", + "logoutAndClearAllDataInclSettings": "Se déconnecter et effacer toutes les données, y compris les paramètres" }, "calender": { "saveToCalenderError": "Un problème est survenu", @@ -109,7 +111,7 @@ }, "contact": { "a11y_show_contact_info_button_hint": "Affiche les informations de contact", - "home": "Domicilr", + "home": "Adresse", "email": "Courriel", "sms": "Texto", "call": "Appeler", @@ -125,5 +127,18 @@ "contactsForGuardiansFor": "Coordonnées des tuteurs pour", "child": "Enfant", "class": "Classe" + }, + "settings": { + "settings": "Paramètres", + "useSystemTheme": "Utiliser le thème clair/sombre du système", + "language": "Langue", + "appearance": "Apparence", + "theme": "Thème", + "licenses": "Licences", + "themeAuto": "Automatique" + }, + "themes": { + "light": "Clair", + "dark": "Sombre" } } From 3c0af7594abd978c85c7914b5b84a2b68aab3ae6 Mon Sep 17 00:00:00 2001 From: Zinel-Alexandru Date: Tue, 9 Nov 2021 07:25:43 +0000 Subject: [PATCH 18/41] Translated using Weblate (Spanish) Currently translated at 65.3% (68 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/es/ --- apps/skolplattformen-sthlm/translations/es.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/es.json b/apps/skolplattformen-sthlm/translations/es.json index 5d9eabfc5..6d2f7d8b6 100644 --- a/apps/skolplattformen-sthlm/translations/es.json +++ b/apps/skolplattformen-sthlm/translations/es.json @@ -54,7 +54,9 @@ "agile": "ágil", "fantastic": "fantástica", "cheap": "barato", - "better": "mejor" + "better": "mejor", + "homemade": "artesanal", + "open": "abierto" }, "subtitle": "La alternativa {{word}}", "placeholder_SocialSecurityNumber": "Tu personnummer", @@ -66,7 +68,9 @@ "OpenOnAnotherDevice": "Abra BankID en otro dispositivo", "OpenManually": "Abrir BankID manualmente" }, - "loginAsTestUser": "Inicie sesión como usuario de pruebas" + "loginAsTestUser": "Inicie sesión como usuario de pruebas", + "a11y_change_language": "Elija su idioma", + "a11y_image_two_boys": "Fotografia de dos personas mirando su telefono movil" }, "abscense": { "title": "Informar ausencia", From e976e827d06175216ae436a63ec3f3c27af6938c Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Tue, 9 Nov 2021 20:40:02 +0000 Subject: [PATCH 19/41] Translated using Weblate (Italian) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/it/ --- .../translations/it.json | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/it.json b/apps/skolplattformen-sthlm/translations/it.json index ded342293..e2252cfc7 100644 --- a/apps/skolplattformen-sthlm/translations/it.json +++ b/apps/skolplattformen-sthlm/translations/it.json @@ -22,7 +22,9 @@ "loading": "Caricamento in corso…", "confirm": "Conferma", "changeLanguage": "Cambia lingua", - "cancel": "Interrompere" + "cancel": "Interrompere", + "logoutAndClearPersonalData": "Esci ed elimina i dati personali", + "logoutAndClearAllDataInclSettings": "Esci ed elimina tutti i dati, comprese le impostazioni" }, "schedule": { "end": "Finische", @@ -34,7 +36,8 @@ "notifications": "Notifiche", "news": "Novità", "menu": "Menù pranzo", - "calender": "Calendario" + "calender": "Calendario", + "classmates": "Compagni di classe" }, "language": { "changeLanguageButton": "Salva", @@ -113,6 +116,29 @@ "emptyText": "Non ho trovato nulla per questa settimana" }, "contact": { - "a11y_show_contact_info_button_hint": "Mostra le informazioni di contatto" + "a11y_show_contact_info_button_hint": "Mostra le informazioni di contatto", + "call": "Chiama", + "sms": "SMS", + "email": "E-mail", + "home": "Indirizzo", + "a11y_show_contact_info_button_label": "Mostra le informazioni di contatto" + }, + "settings": { + "settings": "Impostazioni", + "theme": "Tema", + "themeAuto": "Automatico", + "licenses": "Licenze", + "language": "Lingua", + "appearance": "Aspetto", + "useSystemTheme": "Usa il tema chiaro/scuro del sistema" + }, + "themes": { + "light": "Chiaro", + "dark": "Scuro" + }, + "classmates": { + "class": "Classe", + "child": "Bambino", + "contactsForGuardiansFor": "Informazioni di contatto per i tutori per" } } From 0b1cd1bd7da9d9f83a64d9e39b65c29817b2fe3c Mon Sep 17 00:00:00 2001 From: SC Date: Mon, 8 Nov 2021 19:08:33 +0000 Subject: [PATCH 20/41] Translated using Weblate (Portuguese) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/pt/ --- .../translations/pt.json | 145 +++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/translations/pt.json b/apps/skolplattformen-sthlm/translations/pt.json index 0967ef424..b288f472e 100644 --- a/apps/skolplattformen-sthlm/translations/pt.json +++ b/apps/skolplattformen-sthlm/translations/pt.json @@ -1 +1,144 @@ -{} +{ + "abscense": { + "entireDay": "O dia inteiro", + "selectAbscenseStartTime": "Indique a hora de início", + "startTime": "Hora de início", + "title": "Reportar ausência", + "selectAbscenseEndTime": "Indique a hora de fim", + "endTime": "Hora de fim", + "invalidPersonalNumber": "Número de identidade pessoal inválido", + "personalNumberMissing": "Falta o número de identidade pessoal" + }, + "auth": { + "bankid": { + "OpenManually": "Abrir BankID manualmente", + "OpenOnAnotherDevice": "Abrir BankID noutro dispositivo", + "Waiting": "A aguardar pelo BankID…", + "OpenOnThisDevice": "Abrir BankID neste dispositivo" + }, + "loginAsTestUser": "Autenticar como utilizador em teste", + "loginFailed": "Não foi possível autenticar. Por favor tente novamente.", + "placeholder_SocialSecurityNumber": "O seu número de identidade pessoal", + "words": { + "agile": "ágil", + "better": "melhor", + "awaited": "esperada", + "free": "livre", + "cooler": "interessante", + "enlightened": "mais clara", + "fantastic": "fantástica", + "first": "inicial", + "homemade": "caseira", + "imperfect": "imperfeita", + "open": "aberta", + "simple": "fácil", + "working": "funcional", + "cheap": "barata", + "fun": "divertida", + "fast": "rápida", + "rebellious": "rebelde" + }, + "subtitle": "A alternativa {{word}}", + "a11y_change_language": "Selecione o seu idioma", + "a11y_image_two_boys": "Fotografia de duas pessoas a verem os seus telemóveis", + "a11y_clear_social_security_input_field": "Limpar o campo do número de identificação pessoal", + "chooseLoginMethod": "Escolha o método de autenticação", + "a11y_select_login_method": "Selecione o método de autenticação" + }, + "abbrevations": { + "compulsorySchool": "Escola primária / secundária inferior", + "leisureTimeCentre": "Cuidados pós-escolares", + "upperSecondarySchool": "Escola secundária superior", + "preSchool": "Pré-escola" + }, + "calender": { + "showCalenderActions": "Mostrar ações do calendário", + "saveToCalenderError": "Algo correu mal", + "saveToCalenderSuccess": "✔️ Guardado no calendário", + "approveAccessToCalender": "Tem de autorizar o acesso ao seu calendário", + "saveToCalender": "Guardar no calendário" + }, + "children": { + "loadingErrorHeading": "Ups!", + "loadingErrorInformationText": "Esta página não pode ser carregada. Tente novamente ou veja o estado atual em skolplattformen.org", + "noKids_description": "Não existem crianças registadas na cidade de Estocolmo para o seu número de identificação pessoal", + "noKids_title": "Sem crianças", + "tryAgain": "Tentar novamente", + "title": "Os seus filhos", + "viewStatus": "Ver estado em skolplattformen.org" + }, + "general": { + "changeLanguage": "Alterar idioma", + "confirm": "Confirmar", + "loading": "A carregar…", + "logout": "Sair", + "logoutAndClearAllDataInclSettings": "Sair e limpar todos os dados, incluindo as configurações", + "send": "Enviar", + "socialSecurityNumber": "Número de identidade pessoal", + "title": "Öppna skolplattformen", + "logoutAndClearPersonalData": "Sair e limpar dados pessoais", + "cancel": "Cancelar", + "settings": "Configurações" + }, + "language": { + "changeLanguage": "Alterar idioma", + "changeLanguageButton": "Guardar" + }, + "menu": { + "emptyHeadline": "O menu do almoço parece um pouco vazio", + "emptyText": "Não consegui encontrar nada para esta semana" + }, + "navigation": { + "calender": "Calendário", + "menu": "Almoço", + "news": "Notícias", + "notifications": "Notificações", + "classmates": "Colegas de turma" + }, + "settings": { + "settings": "Configurações", + "useSystemTheme": "Usar o tema claro / escuro do sistema", + "appearance": "Aparência", + "theme": "Tema", + "licenses": "Licenças", + "language": "Idioma", + "themeAuto": "Automático" + }, + "themes": { + "light": "Claro", + "dark": "Escuro" + }, + "news": { + "backToChild": "Voltar à criança", + "noNewNewsItemsThisWeek": "Não há novidades esta semana.", + "notificationTitle": "Notícia: {{header}} ({{published}})", + "published": "Publicada", + "updated": "Atualizada", + "title": "Notícias de Skolplattformen", + "search": { + "placeholder": "Procurar nas notícias…" + } + }, + "schedule": { + "start": "Início", + "end": "Fim", + "lunch": "Almoço", + "gymBag": "Saco de ginástica" + }, + "classmates": { + "class": "Turma", + "child": "Criança", + "contactsForGuardiansFor": "Informações de contacto dos tutores para" + }, + "contact": { + "call": "Ligar", + "email": "E-mail", + "home": "Morada", + "a11y_show_contact_info_button_hint": "Mostra informações de contacto", + "a11y_show_contact_info_button_label": "Mostrar informações de contacto", + "sms": "SMS" + }, + "notifications": { + "notificationTitle": "Notificação: {{message}} ({{dateCreated}})" + } +} From 3d247cb133b270e60bd97d2a626b447d54363308 Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Wed, 10 Nov 2021 09:00:45 +0000 Subject: [PATCH 21/41] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (104 of 104 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/zh_Hant/ --- .../translations/zh_Hant.json | 145 +++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/translations/zh_Hant.json b/apps/skolplattformen-sthlm/translations/zh_Hant.json index 0967ef424..20cfe3eb0 100644 --- a/apps/skolplattformen-sthlm/translations/zh_Hant.json +++ b/apps/skolplattformen-sthlm/translations/zh_Hant.json @@ -1 +1,144 @@ -{} +{ + "abbrevations": { + "compulsorySchool": "小學/初中", + "leisureTimeCentre": "課後託管", + "preSchool": "學前班", + "upperSecondarySchool": "高中" + }, + "abscense": { + "endTime": "結束時間", + "entireDay": "全天", + "invalidPersonalNumber": "個人身份號碼無效", + "personalNumberMissing": "缺少個人身份號碼", + "selectAbscenseEndTime": "選擇結束時間", + "selectAbscenseStartTime": "選擇開始時間", + "startTime": "開始時間", + "title": "報告缺席情況" + }, + "auth": { + "bankid": { + "OpenManually": "手動開啟 BankID", + "OpenOnAnotherDevice": "在另一臺裝置上開啟 BankID", + "OpenOnThisDevice": "在本裝置上開啟 BankID", + "Waiting": "正在等待 BankID 響應…" + }, + "chooseLoginMethod": "選擇登入方式", + "loginAsTestUser": "以測試使用者身份登入", + "loginFailed": "無法登入。請重試。", + "placeholder_SocialSecurityNumber": "你的個人身份號碼", + "subtitle": "{{word}}之選", + "words": { + "agile": "輕快", + "awaited": "久違", + "better": "更佳", + "cheap": "價廉", + "cooler": "酷樂", + "enlightened": "開明", + "fantastic": "匪夷", + "fast": "迅捷", + "first": "一流", + "free": "自由", + "fun": "樂趣", + "homemade": "手製", + "imperfect": "有瑕", + "open": "開放", + "rebellious": "逆流", + "simple": "簡單", + "working": "可用" + }, + "a11y_change_language": "選擇您的語言", + "a11y_image_two_boys": "兩個人看手機的圖片", + "a11y_clear_social_security_input_field": "清空個人身份號碼欄", + "a11y_select_login_method": "選擇登入方式" + }, + "calender": { + "approveAccessToCalender": "您必須允許訪問日曆", + "saveToCalender": "儲存到日曆中", + "saveToCalenderError": "出了點問題", + "saveToCalenderSuccess": "✔️ 已儲存到日曆中", + "showCalenderActions": "顯示日曆操作" + }, + "children": { + "loadingErrorHeading": "啊噢!", + "loadingErrorInformationText": "這個頁面無法載入。請重試或在 skolplattformen.org 網站上檢視當前狀態。", + "noKids_description": "您的個人身份號碼下沒有註冊在斯德哥爾摩市的孩子", + "noKids_title": "沒有找到孩子", + "title": "您的孩子", + "tryAgain": "請重試", + "viewStatus": "在 skolplattformen.org 網站上檢視狀態" + }, + "general": { + "cancel": "取消", + "changeLanguage": "更改語言", + "confirm": "確認", + "loading": "正在載入…", + "logout": "登出", + "logoutAndClearPersonalData": "登出並清除個人資料", + "logoutAndClearAllDataInclSettings": "登出並清除包括設定在內的所有資料", + "send": "傳送", + "settings": "設定", + "socialSecurityNumber": "個人身份號碼", + "title": "開放學校平臺" + }, + "language": { + "changeLanguage": "更改語言", + "changeLanguageButton": "儲存" + }, + "menu": { + "emptyHeadline": "午餐選單看起來有點空", + "emptyText": "找不到有關這個星期的任何內容" + }, + "navigation": { + "calender": "日曆", + "menu": "午餐", + "news": "新聞", + "notifications": "通知", + "classmates": "同班同學" + }, + "settings": { + "settings": "設定", + "appearance": "外觀", + "theme": "主題", + "licenses": "許可證", + "language": "語言", + "themeAuto": "自動", + "useSystemTheme": "使用系統亮色/暗色主題" + }, + "themes": { + "light": "亮色", + "dark": "暗色" + }, + "news": { + "backToChild": "返回到孩子頁面", + "noNewNewsItemsThisWeek": "這個星期沒有新聞。", + "notificationTitle": "新聞:{{header}}({{published}})", + "published": "已釋出", + "title": "來自學校平臺的新聞", + "updated": "已更新", + "search": { + "placeholder": "在新聞中搜索…" + } + }, + "notifications": { + "notificationTitle": "通知:{{message}}({{dateCreated}})" + }, + "schedule": { + "start": "開始", + "end": "結束", + "lunch": "午餐", + "gymBag": "健身袋" + }, + "classmates": { + "class": "課堂", + "child": "孩子", + "contactsForGuardiansFor": "監護人的聯絡資訊" + }, + "contact": { + "a11y_show_contact_info_button_hint": "顯示聯絡資訊", + "a11y_show_contact_info_button_label": "顯示聯絡資訊", + "call": "電話", + "sms": "簡訊", + "email": "電子郵箱", + "home": "家庭地址" + } +} From 3e0fd1474a719382627270a1305110692f9ff99b Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Tue, 16 Nov 2021 13:33:00 +0100 Subject: [PATCH 22/41] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixes=20crash=20whe?= =?UTF-8?q?n=20body=20od=20newItem=20is=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: 525 --- libs/api-skolplattformen/lib/parse/news.ts | 9 ++++++++- libs/api-skolplattformen/lib/parseHtml.ts | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/api-skolplattformen/lib/parse/news.ts b/libs/api-skolplattformen/lib/parse/news.ts index 5bbbd05c4..25c6a1140 100644 --- a/libs/api-skolplattformen/lib/parse/news.ts +++ b/libs/api-skolplattformen/lib/parse/news.ts @@ -26,9 +26,16 @@ export const newsItem = ({ imageUrl: bannerImageUrl, fullImageUrl: `${IMAGE_HOST}${bannerImageUrl}`, imageAltText: altText, - body: toMarkdown(body), + body: toNonEmptyMarkdownString(body), }) +// Fixes https://github.com/kolplattformen/skolplattformen/issues/525 +const toNonEmptyMarkdownString = (str: string): string => { + const res = toMarkdown(str); + if(res?.length == 0 ) return ' ' + return res +} + const newsSort = (item1: NewsItem, item2: NewsItem): number => { const m1 = item1.modified || item1.published const m2 = item2.modified || item2.published diff --git a/libs/api-skolplattformen/lib/parseHtml.ts b/libs/api-skolplattformen/lib/parseHtml.ts index 62592412f..3cdb9d7d5 100644 --- a/libs/api-skolplattformen/lib/parseHtml.ts +++ b/libs/api-skolplattformen/lib/parseHtml.ts @@ -105,6 +105,9 @@ const overides = { } export const toMarkdown = (html?: string): string => { + + if(html?.length == 0) return '' + const rearranged = rearrangeWhitespace(html) const trimmed = clean(rearranged) const markdown = h2m(trimmed, { overides, converter }) From b2c8c8279157d5273ab211be5e739e8b3ebce5f3 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Tue, 16 Nov 2021 14:14:18 +0100 Subject: [PATCH 23/41] =?UTF-8?q?test:=20=F0=9F=92=8D=20Fixed=20failing=20?= =?UTF-8?q?contact=20list=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/__tests__/ContactMenu.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/components/__tests__/ContactMenu.test.js b/apps/skolplattformen-sthlm/components/__tests__/ContactMenu.test.js index afa3585ae..aa9cf8695 100644 --- a/apps/skolplattformen-sthlm/components/__tests__/ContactMenu.test.js +++ b/apps/skolplattformen-sthlm/components/__tests__/ContactMenu.test.js @@ -112,7 +112,7 @@ test('displays address of guardian', () => { fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - fireEvent.press(screen.getByText(/hem/i)) + fireEvent.press(screen.getByText(/adress/i)) expect(Linking.openURL).toHaveBeenCalledWith( 'http://maps.apple.com/?daddr=Testgatan' ) From 5028a85824f4d73ab8007caaeca32a439f4f360e Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Tue, 16 Nov 2021 22:59:25 +0100 Subject: [PATCH 24/41] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Clarify=20who's=20p?= =?UTF-8?q?ersonal=20identity=20number=20to=20enter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #526 --- apps/skolplattformen-sthlm/components/absence.component.tsx | 2 +- apps/skolplattformen-sthlm/translations/en.json | 1 + apps/skolplattformen-sthlm/translations/pl.json | 1 + apps/skolplattformen-sthlm/translations/sv.json | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/components/absence.component.tsx b/apps/skolplattformen-sthlm/components/absence.component.tsx index 011f5bdb5..4009b5f97 100644 --- a/apps/skolplattformen-sthlm/components/absence.component.tsx +++ b/apps/skolplattformen-sthlm/components/absence.component.tsx @@ -138,7 +138,7 @@ const Absence = () => { - {translate('general.socialSecurityNumber')} + {translate('abscense.childsPersonalNumber')} Date: Tue, 16 Nov 2021 23:51:44 +0100 Subject: [PATCH 25/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20activate=20norwegi?= =?UTF-8?q?an?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 4fbf9c3e5..53004ff91 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -74,7 +74,7 @@ export const languages: Language[] = [ langCode: 'nb_NO', languageName: 'Norwegian Bokmål', languageLocalName: 'Norsk bokmål', - active: false, + active: true, }, { langCode: 'pl', From eed2a7579c23629c0e8dbd8350fa971cec3753fb Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:08:46 +0100 Subject: [PATCH 26/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Chinese=20(simplif?= =?UTF-8?q?ied=20and=20traditional)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/languageService.ts | 1 + apps/skolplattformen-sthlm/utils/translation.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index af6cce2e9..34e9a0363 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -14,6 +14,7 @@ import 'moment/locale/pl' import 'moment/locale/ru' import 'moment/locale/sv' import 'moment/locale/uz-latn' +import 'moment/locale/zh-cn' import { I18nManager } from 'react-native' const changeListeners: Record = {} diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 53004ff91..a536a3f0a 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -20,6 +20,18 @@ export const languages: Language[] = [ languageLocalName: 'اَلْعَرَبِيَّةُ', active: true, }, + { + langCode: 'zh_Hant', + languageName: 'Chinese (traditional)', + languageLocalName: '中國傳統的', + active: true, + }, + { + langCode: 'zh_Hans', + languageName: 'Chinese (simplified)', + languageLocalName: '简体中文', + active: true, + }, { langCode: 'nl', languageName: 'Dutch', @@ -118,6 +130,8 @@ export const translations = { ru: require('../translations/ru.json'), so: require('../translations/so.json'), sv: require('../translations/sv.json'), + zh_Hans: require('../translations/zh_Hans.json'), + zh_Hant: require('../translations/zh_Hant.json') } export const translate = (key: string, options?: TranslateOptions) => { From 1c051961d695ebb2546f2a30991d01015e7c48fb Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:31:13 +0100 Subject: [PATCH 27/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Latin=20and=20fix?= =?UTF-8?q?=20for=20locales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skolplattformen-sthlm/services/languageService.ts | 11 ++++++++--- apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index 34e9a0363..ccb799079 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -13,7 +13,6 @@ import 'moment/locale/nl' import 'moment/locale/pl' import 'moment/locale/ru' import 'moment/locale/sv' -import 'moment/locale/uz-latn' import 'moment/locale/zh-cn' import { I18nManager } from 'react-native' @@ -40,6 +39,13 @@ export const isRTL = (langCode: string) => { return rtlList[langCode] } +const getCorrespondingMomentLocale = (langCode?: string): string => { + if(langCode === 'la') return 'sv' + if(langCode === 'nb_NO') return 'nb' + if(langCode === 'zh_Hant' || langCode === 'zh_Hans') return 'zh-cn' + return langCode! +} + export const LanguageService = { get: () => Strings, getLanguageCode: () => languageCode, @@ -53,7 +59,7 @@ export const LanguageService = { i18n.locale = langCode I18nManager.forceRTL(isRTL(langCode)) } - moment.locale(langCode) + moment.locale(getCorrespondingMomentLocale(langCode)) }, setLanguageCode: ({ langCode }: { langCode?: string }) => { if (langCode && allString[langCode]) { @@ -69,7 +75,6 @@ export const LanguageService = { }) return Strings }, - onChange: ({ key }: { key: string }, cb: (langCode: string) => void) => { const unsubscribe = () => { delete changeListeners[key] diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index a536a3f0a..fa4c7829e 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -80,7 +80,7 @@ export const languages: Language[] = [ langCode: 'la', languageName: 'Latin', languageLocalName: 'Latina', - active: false, + active: true, }, { langCode: 'nb_NO', From df8f2e378e76d1f4b8f4b0cfd55aba82626ccaa8 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:37:26 +0100 Subject: [PATCH 28/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Somali?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/services/languageService.ts | 1 + apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index ccb799079..d1acb0f5f 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -41,6 +41,7 @@ export const isRTL = (langCode: string) => { const getCorrespondingMomentLocale = (langCode?: string): string => { if(langCode === 'la') return 'sv' + if(langCode === 'so') return 'sv' if(langCode === 'nb_NO') return 'nb' if(langCode === 'zh_Hant' || langCode === 'zh_Hans') return 'zh-cn' return langCode! diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index fa4c7829e..1d37fb29d 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -104,7 +104,7 @@ export const languages: Language[] = [ langCode: 'so', languageName: 'Somali', languageLocalName: 'af-Soomaali', - active: false, + active: true, }, { langCode: 'es', From e5deadd88084fba26a7b8dbc83664be376b76a51 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:39:51 +0100 Subject: [PATCH 29/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Japanese?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 1d37fb29d..138471bcc 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -74,7 +74,7 @@ export const languages: Language[] = [ langCode: 'ja', languageName: 'Japanese', languageLocalName: '日本語', - active: false, + active: true, }, { langCode: 'la', From 4d62d9e26987ae4840f81e1c1ad958a6905746c0 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:46:22 +0100 Subject: [PATCH 30/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20language=20updates?= =?UTF-8?q?=20for=20curriculum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/curriculum/src/translations/de.json | 20 ++- libs/curriculum/src/translations/pt.json | 124 ++++++++++++++++++ libs/curriculum/src/translations/zh_Hans.json | 71 ++++++++++ 3 files changed, 208 insertions(+), 7 deletions(-) create mode 100644 libs/curriculum/src/translations/pt.json create mode 100644 libs/curriculum/src/translations/zh_Hans.json diff --git a/libs/curriculum/src/translations/de.json b/libs/curriculum/src/translations/de.json index 170502d35..b6c54c556 100644 --- a/libs/curriculum/src/translations/de.json +++ b/libs/curriculum/src/translations/de.json @@ -1,15 +1,15 @@ { "subjects": { "TN": "Zei­chen­spra­che", - "SVA": "Schewdishe als främdsprache", - "SV": "Schwedish", - "SL": "Handwerk", + "SVA": "Schwedisch als Fremdsprache", + "SV": "Schwedisch", + "SL": "Werken", "SH": "Staats­bür­ger­kun­de", "RE": "Re­li­gi­on", - "HI": "Historie", + "HI": "Geschichte", "GE": "Geografie", - "NO": "Naturwissenschaftlichen Themen", - "SO": "Gesellschaftsorientierte Themen", + "NO": "Naturwissenschaften", + "SO": "Gesellschaftslehre", "KE": "Chemie", "FY": "Physik", "BI": "Biologie", @@ -18,6 +18,12 @@ "IDH": "Sport und Gesundheit", "HKK": "Hauswirtschaft", "EN": "Englisch", - "BL": "Kunst" + "BL": "Kunst", + "TK": "Technik" + }, + "misc": { + "PRANDIUM": "Mittagspause", + "LUNCH": "Mittagspause", + "RAST": "Pause" } } diff --git a/libs/curriculum/src/translations/pt.json b/libs/curriculum/src/translations/pt.json new file mode 100644 index 000000000..85a0ba086 --- /dev/null +++ b/libs/curriculum/src/translations/pt.json @@ -0,0 +1,124 @@ +{ + "subjects": { + "HKK": "Estudos domésticos e de consumo", + "BL": "Arte", + "EN": "Inglês", + "MA": "Matemática", + "MU": "Música", + "BI": "Biologia", + "FY": "Física", + "GE": "Geografia", + "NO": "Estudos científicos", + "KE": "Química", + "SO": "Temas de estudos sociais", + "IDH": "Educação física e saúde", + "TN": "Linguagem gestual", + "ES": "Estética", + "HI": "História", + "RE": "Religião", + "SH": "Educação cívica", + "SL": "Trabalhos manuais", + "SV": "Sueco", + "DA": "Estudos preparatórios de dança", + "JU": "Estudos judaicos", + "SVA": "Sueco como segunda língua", + "TK": "Tecnologia" + }, + "traningsskolaSubjects": { + "VAA": "Atividades diárias", + "VEU": "Percepção", + "KOM": "Comunicação", + "MOT": "Coordenação física" + }, + "languages": { + "KMR": "Curdo, norte", + "HUN": "Húngaro", + "BUL": "Búlgaro", + "ISL": "Islandês", + "KOR": "Coreano", + "SDH": "Curdo, sul", + "LIT": "Lituano", + "CKB": "Curdo, central", + "AMH": "Amárico", + "HYE": "Arménio", + "AYM": "Aimará", + "MYA": "Birmanês", + "DAN": "Dinamarquês", + "VLS": "Flamengo", + "HEB": "Hebraico", + "ITA": "Italiano", + "CAT": "Catalão", + "KUR": "Curdo", + "MLT": "Maltês", + "NOR": "Norueguês", + "RON": "Romeno", + "TIB": "Tibetano", + "UKR": "Ucraniano", + "AFR": "Africâner", + "SQI": "Albanês", + "BOS": "Bósnio", + "EST": "Estoniano", + "FIJ": "Fijiano", + "FIN": "Finlandês", + "FRA": "Francês", + "KAT": "Georgiano", + "GRE": "Grego", + "GUJ": "Gujarati", + "IND": "Indonésio", + "YID": "Iídiche", + "KAZ": "Cazaque", + "ZHO": "Chinês", + "NAN": "Chinês, min nan", + "ROP": "Crioulo", + "HRV": "Croata", + "FAS": "Persa", + "POR": "Português", + "RUS": "Russo", + "SLK": "Eslovaco", + "ARA": "Árabe", + "JPN": "Japonês", + "YUE": "Chinês, cantonês", + "LAV": "Letão", + "DEU": "Alemão", + "VIE": "Vietnamita", + "CMN": "Chinês, mandarim", + "MKD": "Macedónio", + "LAO": "Laociano", + "NLD": "Holandês", + "NEP": "Nepalês", + "HBS": "Servo-croata", + "SLV": "Esloveno", + "SPA": "Espanhol", + "CES": "Checo", + "TUR": "Turco", + "SPK": "Outro idioma" + }, + "specialLanguages": { + "SVA": "O sueco como segunda língua", + "EN": "Inglês", + "FR": "Francês", + "IT": "Italiano", + "SV": "Sueco", + "PO": "Português", + "RY": "Russo", + "SAM": "Sami", + "SP": "Espanhol", + "TN": "Linguagem gestual", + "TY": "Alemão", + "FI": "Finlandês", + "JAP": "Japonês", + "KI": "Chinês" + }, + "categories": { + "trainingSchool": "Escola obrigatória para crianças com graves dificuldades de aprendizagem", + "modernLanguages": "Idiomas modernos", + "unknown": "Desconhecido", + "misc": "Diversos" + }, + "misc": { + "RAST": "Intervalo", + "MTID": "Tempo do mentor", + "LUNCH": "Almoço", + "PRANDIUM": "Almoço" + } +} diff --git a/libs/curriculum/src/translations/zh_Hans.json b/libs/curriculum/src/translations/zh_Hans.json new file mode 100644 index 000000000..1da08a0a9 --- /dev/null +++ b/libs/curriculum/src/translations/zh_Hans.json @@ -0,0 +1,71 @@ +{ + "subjects": { + "BL": "美术", + "HKK": "家庭和消费者研究", + "IDH": "体育与健康", + "MA": "数学", + "MU": "音乐", + "BI": "生物", + "FY": "物理", + "KE": "化学", + "SO": "社会研究项目", + "GE": "地理", + "HI": "历史", + "RE": "宗教学", + "SH": "公民学", + "SL": "手工课", + "SV": "瑞典语", + "SVA": "瑞典语(第二语言)", + "TN": "手语", + "TK": "技术", + "JU": "犹太学", + "ES": "美学", + "EN": "英语", + "NO": "科学研究", + "DA": "预备舞蹈研究" + }, + "traningsskolaSubjects": { + "MOT": "身体协调", + "VAA": "日常活动", + "VEU": "感知课", + "KOM": "传媒学" + }, + "specialLanguages": { + "EN": "英语", + "IT": "意大利语", + "JAP": "日语", + "KI": "汉语", + "PO": "葡萄牙语", + "SAM": "萨米语", + "SP": "西班牙语", + "SV": "瑞典语", + "SVA": "瑞典语(第二语言)", + "TN": "手语", + "TY": "德语", + "FR": "法语", + "RY": "俄语", + "FI": "芬兰语" + }, + "languages": { + "ACE": "亚齐语", + "ACH": "阿科利语", + "SPK": "其他语言", + "ZUL": "祖鲁语", + "TUR": "土耳其语", + "DEU": "德语", + "UIG": "维吾尔语", + "UKR": "乌克兰语", + "HUN": "匈牙利语", + "URD": "乌尔都语", + "UZB": "乌兹别克语", + "VIE": "越南语", + "WOL": "沃洛夫语", + "YOR": "约鲁巴语、雅里巴语、约巴语" + }, + "categories": { + "unknown": "未知", + "modernLanguages": "现代语言", + "trainingSchool": "重度学习障碍儿童义务教育学校", + "misc": "杂项" + } +} From 2f45cbdeb639cd43c6b13cff0a2f86a934b950dd Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 00:57:14 +0100 Subject: [PATCH 31/41] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Portuguese?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/services/languageService.ts | 1 + apps/skolplattformen-sthlm/utils/translation.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index d1acb0f5f..1b6c10c58 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -11,6 +11,7 @@ import 'moment/locale/ja' import 'moment/locale/nb' import 'moment/locale/nl' import 'moment/locale/pl' +import 'moment/locale/pt' import 'moment/locale/ru' import 'moment/locale/sv' import 'moment/locale/zh-cn' diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 138471bcc..7c2bcce23 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -94,6 +94,12 @@ export const languages: Language[] = [ languageLocalName: 'Polski', active: true, }, + { + langCode: 'pt', + languageName: 'Portuguese', + languageLocalName: 'Português', + active: true, + }, { langCode: 'ru', languageName: 'Russian', @@ -127,6 +133,7 @@ export const translations = { nb_NO: require('../translations/nb_NO.json'), nl: require('../translations/nl.json'), pl: require('../translations/pl.json'), + pt: require('../translations/pt.json'), ru: require('../translations/ru.json'), so: require('../translations/so.json'), sv: require('../translations/sv.json'), From b9302f96faaf71c797ec335018d9952e26e9d267 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 01:17:33 +0100 Subject: [PATCH 32/41] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Add=20languages=20t?= =?UTF-8?q?o=20curriculum=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/curriculum/src/translations/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/curriculum/src/translations/index.ts b/libs/curriculum/src/translations/index.ts index 519bd2f70..28ca60a62 100644 --- a/libs/curriculum/src/translations/index.ts +++ b/libs/curriculum/src/translations/index.ts @@ -22,6 +22,8 @@ const translations: Translations = { la: require('./la.json'), nb_NO: require('./nb_NO.json'), pl: require('./pl.json'), + pt: require('./pt.json'), + zh_Hans: require('./zh_Hans.json'), } const languageList: string[] = Object.keys(translations) export type Language = typeof languageList[number] From 1e6ebb8f2aba749a630862cb3c9635549352dfa4 Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Wed, 17 Nov 2021 01:21:05 +0100 Subject: [PATCH 33/41] =?UTF-8?q?style:=20=F0=9F=92=84=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/services/languageService.ts | 8 ++++---- apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index 1b6c10c58..8054b9451 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -41,10 +41,10 @@ export const isRTL = (langCode: string) => { } const getCorrespondingMomentLocale = (langCode?: string): string => { - if(langCode === 'la') return 'sv' - if(langCode === 'so') return 'sv' - if(langCode === 'nb_NO') return 'nb' - if(langCode === 'zh_Hant' || langCode === 'zh_Hans') return 'zh-cn' + if (langCode === 'la') return 'sv' + if (langCode === 'so') return 'sv' + if (langCode === 'nb_NO') return 'nb' + if (langCode === 'zh_Hant' || langCode === 'zh_Hans') return 'zh-cn' return langCode! } diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 7c2bcce23..86675bb3c 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -138,7 +138,7 @@ export const translations = { so: require('../translations/so.json'), sv: require('../translations/sv.json'), zh_Hans: require('../translations/zh_Hans.json'), - zh_Hant: require('../translations/zh_Hant.json') + zh_Hant: require('../translations/zh_Hant.json'), } export const translate = (key: string, options?: TranslateOptions) => { From 623bf483b52a54a6199e6607248b948b775b6e7b Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Thu, 18 Nov 2021 00:54:57 +0100 Subject: [PATCH 34/41] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20crash=20when?= =?UTF-8?q?=20moment=20locale=20and=20language=20code=20differ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/week.component.tsx | 2 +- .../services/languageService.ts | 15 ++++++++------- .../utils/translation.ts | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/apps/skolplattformen-sthlm/components/week.component.tsx b/apps/skolplattformen-sthlm/components/week.component.tsx index a5d8cb472..0c70aae24 100644 --- a/apps/skolplattformen-sthlm/components/week.component.tsx +++ b/apps/skolplattformen-sthlm/components/week.component.tsx @@ -104,7 +104,7 @@ export const Day = ({ weekDay, lunch, lessons }: DayProps) => { } export const Week = ({ child }: WeekProps) => { - moment.locale(LanguageService.getLanguageCode()) + moment.locale(LanguageService.getLocale()) const days = moment.weekdaysShort().slice(1, 6) const currentDayIndex = Math.min(moment().isoWeekday() - 1, 5) const [selectedIndex, setSelectedIndex] = useState(currentDayIndex) diff --git a/apps/skolplattformen-sthlm/services/languageService.ts b/apps/skolplattformen-sthlm/services/languageService.ts index 8054b9451..862ad0596 100644 --- a/apps/skolplattformen-sthlm/services/languageService.ts +++ b/apps/skolplattformen-sthlm/services/languageService.ts @@ -16,6 +16,7 @@ import 'moment/locale/ru' import 'moment/locale/sv' import 'moment/locale/zh-cn' import { I18nManager } from 'react-native' +import { languages } from '../utils/translation' const changeListeners: Record = {} @@ -23,6 +24,7 @@ let allString: Record = {} let Strings: Record = {} let languageCode: string +let momentLocale: string const rtlList: { [key: string]: boolean } = { en: false, @@ -40,17 +42,15 @@ export const isRTL = (langCode: string) => { return rtlList[langCode] } -const getCorrespondingMomentLocale = (langCode?: string): string => { - if (langCode === 'la') return 'sv' - if (langCode === 'so') return 'sv' - if (langCode === 'nb_NO') return 'nb' - if (langCode === 'zh_Hant' || langCode === 'zh_Hans') return 'zh-cn' - return langCode! +const getCorrespondingMomentLocale = (languageCode?: string): string => { + const lang = languages.find(({ langCode }) => langCode === languageCode) + return lang?.locale || 'sv' } export const LanguageService = { get: () => Strings, getLanguageCode: () => languageCode, + getLocale: () => momentLocale, setAllData: ({ data }: { data: Record }) => { allString = data }, @@ -61,11 +61,12 @@ export const LanguageService = { i18n.locale = langCode I18nManager.forceRTL(isRTL(langCode)) } - moment.locale(getCorrespondingMomentLocale(langCode)) + moment.locale(momentLocale) }, setLanguageCode: ({ langCode }: { langCode?: string }) => { if (langCode && allString[langCode]) { languageCode = langCode + momentLocale = getCorrespondingMomentLocale(langCode) Strings = merge(allString.sv, allString[langCode]) } else { const dataKeys = Object.keys(allString) diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 86675bb3c..58508600b 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -4,6 +4,7 @@ interface Language { langCode: string languageName: string languageLocalName: string + locale: string active: boolean } @@ -12,36 +13,42 @@ export const languages: Language[] = [ langCode: 'sv', languageName: 'Swedish', languageLocalName: 'Svenska', + locale: 'sv', active: true, }, { langCode: 'ar', languageName: 'Arabic', languageLocalName: 'اَلْعَرَبِيَّةُ', + locale: 'ar', active: true, }, { langCode: 'zh_Hant', languageName: 'Chinese (traditional)', languageLocalName: '中國傳統的', + locale: 'zh-cn', active: true, }, { langCode: 'zh_Hans', languageName: 'Chinese (simplified)', languageLocalName: '简体中文', + locale: 'zh-cn', active: true, }, { langCode: 'nl', languageName: 'Dutch', languageLocalName: 'Nederlands', + locale: 'nl', active: true, }, { langCode: 'en', languageName: 'English', languageLocalName: 'English', + locale: 'en', active: true, }, @@ -49,6 +56,7 @@ export const languages: Language[] = [ langCode: 'de', languageName: 'German', languageLocalName: 'Deutsch', + locale: 'de', active: true, }, @@ -56,66 +64,77 @@ export const languages: Language[] = [ langCode: 'fi', languageName: 'Finnish', languageLocalName: 'Suomi', + locale: 'fi', active: true, }, { langCode: 'fr', languageName: 'French', languageLocalName: 'Français', + locale: 'fr', active: true, }, { langCode: 'it', languageName: 'Italian', languageLocalName: 'Italiano', + locale: 'it', active: true, }, { langCode: 'ja', languageName: 'Japanese', languageLocalName: '日本語', + locale: 'ja', active: true, }, { langCode: 'la', languageName: 'Latin', languageLocalName: 'Latina', + locale: 'sv', active: true, }, { langCode: 'nb_NO', languageName: 'Norwegian Bokmål', languageLocalName: 'Norsk bokmål', + locale: 'nb', active: true, }, { langCode: 'pl', languageName: 'Polish', languageLocalName: 'Polski', + locale: 'pl', active: true, }, { langCode: 'pt', languageName: 'Portuguese', languageLocalName: 'Português', + locale: 'pt', active: true, }, { langCode: 'ru', languageName: 'Russian', languageLocalName: 'русский', + locale: 'ru', active: false, }, { langCode: 'so', languageName: 'Somali', languageLocalName: 'af-Soomaali', + locale: 'sv', active: true, }, { langCode: 'es', languageName: 'Spanish', languageLocalName: 'Español', + locale: 'es', active: true, }, ] From 8fbc896cd31eb491d577d7e691d01a63cee99170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 17 Nov 2021 02:09:13 +0000 Subject: [PATCH 35/41] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 99.0% (104 of 105 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/nb_NO/ --- apps/skolplattformen-sthlm/translations/nb_NO.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/skolplattformen-sthlm/translations/nb_NO.json b/apps/skolplattformen-sthlm/translations/nb_NO.json index 0f5ec4d45..440c87189 100644 --- a/apps/skolplattformen-sthlm/translations/nb_NO.json +++ b/apps/skolplattformen-sthlm/translations/nb_NO.json @@ -83,7 +83,8 @@ "personalNumberMissing": "Personnummer mangler", "invalidPersonalNumber": "Ugyldig personnummer", "entireDay": "Hele dagen", - "endTime": "Slutt" + "endTime": "Slutt", + "childsPersonalNumber": "Barnets personnummer" }, "abbrevations": { "upperSecondarySchool": "Videregående", @@ -133,7 +134,9 @@ "appearance": "Utseende", "themeAuto": "Auto", "theme": "Drakt", - "language": "Språk" + "language": "Språk", + "licenses": "Lisenser", + "useSystemTheme": "Ifør systemets drakt" }, "themes": { "light": "Lys", From c3c637c16150d1fb9eb5e4289f066d330573aad4 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Sun, 21 Nov 2021 00:49:32 +0000 Subject: [PATCH 36/41] Translated using Weblate (French) Currently translated at 100.0% (105 of 105 strings) Translation: Skolplattformen/App translations Translate-URL: https://hosted.weblate.org/projects/skolplattformen/app-translation/fr/ --- apps/skolplattformen-sthlm/translations/fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/translations/fr.json b/apps/skolplattformen-sthlm/translations/fr.json index 95e431066..bd57bd18c 100644 --- a/apps/skolplattformen-sthlm/translations/fr.json +++ b/apps/skolplattformen-sthlm/translations/fr.json @@ -63,7 +63,8 @@ "endTime": "Heure de fin", "selectAbscenseEndTime": "Choisissez l'heure de la fin", "entireDay": "Toute la journée", - "title": "Signaler une absence" + "title": "Signaler une absence", + "childsPersonalNumber": "Numéro national d’identité de l'enfant" }, "notifications": { "notificationTitle": "Notification : {{message}} ({{dateCreated}})" From b751897d5607d7478d50efd96a367f2221555c36 Mon Sep 17 00:00:00 2001 From: Rickard Natt och Dag Date: Tue, 23 Nov 2021 18:22:47 +0100 Subject: [PATCH 37/41] chore: language fixes (#551) --- apps/website/components/Privacy.tsx | 17 +++++++++++++---- apps/website/components/QA.tsx | 20 +++++++++++--------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/apps/website/components/Privacy.tsx b/apps/website/components/Privacy.tsx index 74645fba4..8562af7e3 100644 --- a/apps/website/components/Privacy.tsx +++ b/apps/website/components/Privacy.tsx @@ -1,3 +1,5 @@ +import Link from './Link' + const Privacy = () => { return (
@@ -5,9 +7,9 @@ const Privacy = () => {

Öppna Skolplattformen

Integritetspolicy

- "Öppna Skolplattformen", hädanefter "appen", byggdes av "No free beer - HB" som en kommersiell app. Appen hämtar all information från - Stockholms Stads skolplattform, hädanefter Skolplattformen, efter + "Öppna Skolplattformen", hädanefter "appen", byggs av "Not free beer + AB" som en kommersiell app. Appen hämtar all information från + Stockholms stads skolplattform, hädanefter Skolplattformen, efter inloggning via BankID. Appens funktion är därmed direkt knuten till att Skolplattformen fungerar. Vi kan endast ta ansvar för att vår kod fungerar – inte deras. @@ -82,7 +84,14 @@ const Privacy = () => { du vill vara på den säkra sidan kan du återbesöka den här sidan då och då.

-

Denna integritetspolicy gäller fr.o.m 2021-02-07

+

+ Denna integritetspolicy gäller fr.o.m. 2021-09-13. Ändringar i denna + policy finns dokumenterade på vår{' '} + + GitHub + + . +

Kontakta oss

Tveka inte att kontakta oss om du har några frågor eller förslag till diff --git a/apps/website/components/QA.tsx b/apps/website/components/QA.tsx index 068831547..e3dfbe08c 100644 --- a/apps/website/components/QA.tsx +++ b/apps/website/components/QA.tsx @@ -1,3 +1,5 @@ +import Link from './Link' + const QA = () => { return (

@@ -86,10 +88,10 @@ const QA = () => {

Din information är lika säker som i Skolplattformen. Vi är integritetsfanatiker och redogör för vår syn på dataskydd i Öppna - skolplattformen i - + skolplattformen i{' '} + vår integritetspolicy - + .

Men ni hanterar ju personinformation?

@@ -146,7 +148,7 @@ const QA = () => { utifrån det. Om vi loggar in med ditt konto, till och med om du sitter med och sköter inloggningen, lär vi se information vi inte har rätt att se. Därför ser vi i dagsläget ingen möjlighet att hjälpa dig :( Vi - hoppas att Stockholms Stad kommer publicera dokumentation till sitt + hoppas att Stockholms stad kommer publicera dokumentation till sitt API och även tillhandahålla säkra testmiljöer så att vi och andra kan utveckla de stöd som fler målgrupper behöver.

@@ -247,7 +249,7 @@ const QA = () => { de?

- Appen kostar 12 kronor. Intäkten registreras i handelsbolaget Not Free + Appen kostar 12 kronor. Intäkten registreras i aktiebolaget Not Free Beer som ägs av tre av utvecklarna och går till att täcka kostnader för inköp. Det täcker inte på långa vägar den tid vi lagt ner. Med en låg engångskostnad ökar vi chansen att vi orkar syssla med underhåll @@ -275,10 +277,10 @@ const QA = () => { Vi är enormt tacksamma för alla buggrapporter och förslag vi får och satsar mycket på att så snabbt som möjligt fixa de saker som dyker upp. För att få lite ordning så försöker vi samla alla buggar och - önskemål på samma ställe, Github. - + önskemål på samma ställe, Github.{' '} + Klicka här - {' '} + {' '} för att se vilka funktioner och buggar vi redan har tagit emot och jobbar på.

@@ -312,7 +314,7 @@ const QA = () => {

Kontakta oss

- Tveka inte att kontakta oss. Skicka ett mail till + Tveka inte att kontakta oss. Skicka ett mail till{' '} dev@skolplattformen.org.

From 84137a4e9a802bd2b83d4ee857ae0e2fc04f52f3 Mon Sep 17 00:00:00 2001 From: Rickard Natt och Dag Date: Tue, 23 Nov 2021 18:41:17 +0100 Subject: [PATCH 38/41] chore(ci): add release build --- .github/workflows/release.yml | 90 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index def667be7..9ca3fb040 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,45 +1,45 @@ -# name: Release - -# on: -# push: -# branches: -# - main - -# jobs: -# build: - -# runs-on: ubuntu-latest - -# steps: -# - name: Checkout code -# uses: actions/checkout@v2 - -# - name: Setup Node -# uses: actions/setup-node@v1 -# with: -# node-version: '14.17.6' - -# - name: Setup timezone -# uses: zcong1993/setup-timezone@master -# with: -# timezone: Europe/Stockholm - -# - name: Install dependencies -# run: npx lerna bootstrap - -# - name: Run linting and tests -# run: | -# yarn lint -# yarn test -# env: -# CI: true - -# - name: Create release using semantic-release -# uses: cycjimmy/semantic-release-action@v2 -# with: -# semantic_version: 17.1.1 -# extra_plugins: | -# @semantic-release/changelog@5.0.1 -# @semantic-release/git@9.0 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +name: Release + +on: + push: + branches: + - main + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '14.17.6' + + - name: Setup timezone + uses: zcong1993/setup-timezone@master + with: + timezone: Europe/Stockholm + + - name: Install dependencies + run: yarn + + - name: Run linting and tests + run: | + yarn lint + yarn test + env: + CI: true + + - name: Create release using semantic-release + uses: cycjimmy/semantic-release-action@v2 + with: + semantic_version: 17.1.1 + extra_plugins: | + @semantic-release/changelog@5.0.1 + @semantic-release/git@9.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 07388c96da98e112456d86a90fa728a14999fb9e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 23 Nov 2021 18:46:32 +0100 Subject: [PATCH 39/41] chore(release): 2.2.0 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [2.2.0](https://github.com/kolplattformen/skolplattformen/compare/v2.1.0...v2.2.0) (2021-11-23) ### Bug Fixes * 🐛 Add languages to curriculum config ([b9302f9](https://github.com/kolplattformen/skolplattformen/commit/b9302f96faaf71c797ec335018d9952e26e9d267)) * 🐛 Clarify who's personal identity number to enter ([5028a85](https://github.com/kolplattformen/skolplattformen/commit/5028a85824f4d73ab8007caaeca32a439f4f360e)), closes [#526](https://github.com/kolplattformen/skolplattformen/issues/526) * 🐛 fix crash when moment locale and language code differ ([623bf48](https://github.com/kolplattformen/skolplattformen/commit/623bf483b52a54a6199e6607248b948b775b6e7b)) * 🐛 Fixes crash when body od newItem is empty ([3e0fd14](https://github.com/kolplattformen/skolplattformen/commit/3e0fd1474a719382627270a1305110692f9ff99b)) * 🐛 Fixes failing tests (added skip), fixes lint + test ([d71c106](https://github.com/kolplattformen/skolplattformen/commit/d71c10607f6a4b89b582b81258fc9c0fc20bf2a8)) * 🐛 Fixes merge with main ([c54f2ff](https://github.com/kolplattformen/skolplattformen/commit/c54f2ffd05589ffbebba5e50b9aef4649bfa9b58)) * 🐛 Fixes tests ([d451cf1](https://github.com/kolplattformen/skolplattformen/commit/d451cf13afbf5e4d1fca43c45d3938d11503d394)) * 🐛 Upgraded async-storage from 1.5.2 to 1.5.9 ([0cd72f5](https://github.com/kolplattformen/skolplattformen/commit/0cd72f5d84bd76b846d99ac7995eba3bec154866)) * add missing package references ([d41e2e3](https://github.com/kolplattformen/skolplattformen/commit/d41e2e3efe278415f3afc462b721afbec4b6f1e2)) * failing html parsing ([2a2259a](https://github.com/kolplattformen/skolplattformen/commit/2a2259a2608ef7e9420d9d3fa59f55530d662ae9)) * images cropping on different devices ([#524](https://github.com/kolplattformen/skolplattformen/issues/524)) ([7c50988](https://github.com/kolplattformen/skolplattformen/commit/7c5098859b71f13ffdb9441b81e149b983355d9f)) * licenses extractor is used on the correct package.json ([d1de447](https://github.com/kolplattformen/skolplattformen/commit/d1de44775b9df6132af9974f6aaef09c5f2d678f)) * lint and prettier fixes ([169b536](https://github.com/kolplattformen/skolplattformen/commit/169b5365e94cd0ff5fe2aa9f28a7baebaeba899a)) * package.json name for app changed ([a867b11](https://github.com/kolplattformen/skolplattformen/commit/a867b116c802956b5f5a8b6ec55e64e6821eb475)) * remove unused e2e files ([97b4380](https://github.com/kolplattformen/skolplattformen/commit/97b438069a589abc37a96fe8c10ce23078b30e7b)) * rename and fix imports ([18ed862](https://github.com/kolplattformen/skolplattformen/commit/18ed8620af5b396eeed740058531ebafda4f8d64)) * some failing tests in hooks now works ([c122f28](https://github.com/kolplattformen/skolplattformen/commit/c122f281a9607d7a52b3a25718e93151ddd7768a)) * ui-kitten metro config ([5fdc3d7](https://github.com/kolplattformen/skolplattformen/commit/5fdc3d71adb8d9364c8c6b345de841f0f3f1de7c)) * update github workflow to run nx instead of lerna ([289c2f8](https://github.com/kolplattformen/skolplattformen/commit/289c2f848aec44da03692d4119aa9e1544dc9292)) ### Features * 🎸 activate norwegian ([cec7ddd](https://github.com/kolplattformen/skolplattformen/commit/cec7ddd8601309f752f9fe49298fcc96643599b7)) * 🎸 bump to version 2.0.4 ([6d762e7](https://github.com/kolplattformen/skolplattformen/commit/6d762e70076c292d952f1b626ea2925caaac78f9)) * 🎸 bump to version 2.0.4 ([078c946](https://github.com/kolplattformen/skolplattformen/commit/078c946a441a4227033c24acbb17807ea19a4dae)) * 🎸 Chinese (simplified and traditional) ([eed2a75](https://github.com/kolplattformen/skolplattformen/commit/eed2a7579c23629c0e8dbd8350fa971cec3753fb)) * 🎸 Japanese ([e5deadd](https://github.com/kolplattformen/skolplattformen/commit/e5deadd88084fba26a7b8dbc83664be376b76a51)) * 🎸 language updates for curriculum ([4d62d9e](https://github.com/kolplattformen/skolplattformen/commit/4d62d9e26987ae4840f81e1c1ad958a6905746c0)) * 🎸 Latin and fix for locales ([1c05196](https://github.com/kolplattformen/skolplattformen/commit/1c051961d695ebb2546f2a30991d01015e7c48fb)) * 🎸 Portuguese ([2f45cbd](https://github.com/kolplattformen/skolplattformen/commit/2f45cbdeb639cd43c6b13cff0a2f86a934b950dd)) * 🎸 Somali ([df8f2e3](https://github.com/kolplattformen/skolplattformen/commit/df8f2e378e76d1f4b8f4b0cfd55aba82626ccaa8)) * add nx build system ([d90cfd2](https://github.com/kolplattformen/skolplattformen/commit/d90cfd2a3b94b9845f809b65a96a72b10447651c)) --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f766d4aa8..26ae5b336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,42 @@ +# [2.2.0](https://github.com/kolplattformen/skolplattformen/compare/v2.1.0...v2.2.0) (2021-11-23) + + +### Bug Fixes + +* 🐛 Add languages to curriculum config ([b9302f9](https://github.com/kolplattformen/skolplattformen/commit/b9302f96faaf71c797ec335018d9952e26e9d267)) +* 🐛 Clarify who's personal identity number to enter ([5028a85](https://github.com/kolplattformen/skolplattformen/commit/5028a85824f4d73ab8007caaeca32a439f4f360e)), closes [#526](https://github.com/kolplattformen/skolplattformen/issues/526) +* 🐛 fix crash when moment locale and language code differ ([623bf48](https://github.com/kolplattformen/skolplattformen/commit/623bf483b52a54a6199e6607248b948b775b6e7b)) +* 🐛 Fixes crash when body od newItem is empty ([3e0fd14](https://github.com/kolplattformen/skolplattformen/commit/3e0fd1474a719382627270a1305110692f9ff99b)) +* 🐛 Fixes failing tests (added skip), fixes lint + test ([d71c106](https://github.com/kolplattformen/skolplattformen/commit/d71c10607f6a4b89b582b81258fc9c0fc20bf2a8)) +* 🐛 Fixes merge with main ([c54f2ff](https://github.com/kolplattformen/skolplattformen/commit/c54f2ffd05589ffbebba5e50b9aef4649bfa9b58)) +* 🐛 Fixes tests ([d451cf1](https://github.com/kolplattformen/skolplattformen/commit/d451cf13afbf5e4d1fca43c45d3938d11503d394)) +* 🐛 Upgraded async-storage from 1.5.2 to 1.5.9 ([0cd72f5](https://github.com/kolplattformen/skolplattformen/commit/0cd72f5d84bd76b846d99ac7995eba3bec154866)) +* add missing package references ([d41e2e3](https://github.com/kolplattformen/skolplattformen/commit/d41e2e3efe278415f3afc462b721afbec4b6f1e2)) +* failing html parsing ([2a2259a](https://github.com/kolplattformen/skolplattformen/commit/2a2259a2608ef7e9420d9d3fa59f55530d662ae9)) +* images cropping on different devices ([#524](https://github.com/kolplattformen/skolplattformen/issues/524)) ([7c50988](https://github.com/kolplattformen/skolplattformen/commit/7c5098859b71f13ffdb9441b81e149b983355d9f)) +* licenses extractor is used on the correct package.json ([d1de447](https://github.com/kolplattformen/skolplattformen/commit/d1de44775b9df6132af9974f6aaef09c5f2d678f)) +* lint and prettier fixes ([169b536](https://github.com/kolplattformen/skolplattformen/commit/169b5365e94cd0ff5fe2aa9f28a7baebaeba899a)) +* package.json name for app changed ([a867b11](https://github.com/kolplattformen/skolplattformen/commit/a867b116c802956b5f5a8b6ec55e64e6821eb475)) +* remove unused e2e files ([97b4380](https://github.com/kolplattformen/skolplattformen/commit/97b438069a589abc37a96fe8c10ce23078b30e7b)) +* rename and fix imports ([18ed862](https://github.com/kolplattformen/skolplattformen/commit/18ed8620af5b396eeed740058531ebafda4f8d64)) +* some failing tests in hooks now works ([c122f28](https://github.com/kolplattformen/skolplattformen/commit/c122f281a9607d7a52b3a25718e93151ddd7768a)) +* ui-kitten metro config ([5fdc3d7](https://github.com/kolplattformen/skolplattformen/commit/5fdc3d71adb8d9364c8c6b345de841f0f3f1de7c)) +* update github workflow to run nx instead of lerna ([289c2f8](https://github.com/kolplattformen/skolplattformen/commit/289c2f848aec44da03692d4119aa9e1544dc9292)) + + +### Features + +* 🎸 activate norwegian ([cec7ddd](https://github.com/kolplattformen/skolplattformen/commit/cec7ddd8601309f752f9fe49298fcc96643599b7)) +* 🎸 bump to version 2.0.4 ([6d762e7](https://github.com/kolplattformen/skolplattformen/commit/6d762e70076c292d952f1b626ea2925caaac78f9)) +* 🎸 bump to version 2.0.4 ([078c946](https://github.com/kolplattformen/skolplattformen/commit/078c946a441a4227033c24acbb17807ea19a4dae)) +* 🎸 Chinese (simplified and traditional) ([eed2a75](https://github.com/kolplattformen/skolplattformen/commit/eed2a7579c23629c0e8dbd8350fa971cec3753fb)) +* 🎸 Japanese ([e5deadd](https://github.com/kolplattformen/skolplattformen/commit/e5deadd88084fba26a7b8dbc83664be376b76a51)) +* 🎸 language updates for curriculum ([4d62d9e](https://github.com/kolplattformen/skolplattformen/commit/4d62d9e26987ae4840f81e1c1ad958a6905746c0)) +* 🎸 Latin and fix for locales ([1c05196](https://github.com/kolplattformen/skolplattformen/commit/1c051961d695ebb2546f2a30991d01015e7c48fb)) +* 🎸 Portuguese ([2f45cbd](https://github.com/kolplattformen/skolplattformen/commit/2f45cbdeb639cd43c6b13cff0a2f86a934b950dd)) +* 🎸 Somali ([df8f2e3](https://github.com/kolplattformen/skolplattformen/commit/df8f2e378e76d1f4b8f4b0cfd55aba82626ccaa8)) +* add nx build system ([d90cfd2](https://github.com/kolplattformen/skolplattformen/commit/d90cfd2a3b94b9845f809b65a96a72b10447651c)) + # [2.1.0](https://github.com/kolplattformen/skolplattformen/compare/v2.0.0...v2.1.0) (2021-10-04) diff --git a/package.json b/package.json index f6ca7056f..4324f7540 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skolplattformen", - "version": "0.0.0", + "version": "2.2.0", "license": "MIT", "scripts": { "start": "nx start", From a28fd97fe7907a591dc92f5ddeccf1045b4f794b Mon Sep 17 00:00:00 2001 From: Kajetan Kazimierczak Date: Tue, 23 Nov 2021 23:07:21 +0100 Subject: [PATCH 40/41] =?UTF-8?q?fix:=20=F0=9F=90=9B=20spelling=20of=20chi?= =?UTF-8?q?nese=20traditional=20in=20chinese=20traditional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/skolplattformen-sthlm/utils/translation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/skolplattformen-sthlm/utils/translation.ts b/apps/skolplattformen-sthlm/utils/translation.ts index 58508600b..762ebab12 100644 --- a/apps/skolplattformen-sthlm/utils/translation.ts +++ b/apps/skolplattformen-sthlm/utils/translation.ts @@ -26,7 +26,7 @@ export const languages: Language[] = [ { langCode: 'zh_Hant', languageName: 'Chinese (traditional)', - languageLocalName: '中國傳統的', + languageLocalName: '繁體中文', locale: 'zh-cn', active: true, }, From 557d6d583f27b728caaa10fe829d63f94125b0de Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 23 Nov 2021 23:14:32 +0100 Subject: [PATCH 41/41] chore(release): 2.2.1 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.2.1](https://github.com/kolplattformen/skolplattformen/compare/v2.2.0...v2.2.1) (2021-11-23) ### Bug Fixes * 🐛 spelling of chinese traditional in chinese traditional ([a28fd97](https://github.com/kolplattformen/skolplattformen/commit/a28fd97fe7907a591dc92f5ddeccf1045b4f794b)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ae5b336..5f5d70ec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.2.1](https://github.com/kolplattformen/skolplattformen/compare/v2.2.0...v2.2.1) (2021-11-23) + + +### Bug Fixes + +* 🐛 spelling of chinese traditional in chinese traditional ([a28fd97](https://github.com/kolplattformen/skolplattformen/commit/a28fd97fe7907a591dc92f5ddeccf1045b4f794b)) + # [2.2.0](https://github.com/kolplattformen/skolplattformen/compare/v2.1.0...v2.2.0) (2021-11-23) diff --git a/package.json b/package.json index 4324f7540..c4ac86625 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skolplattformen", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "scripts": { "start": "nx start",