diff --git a/shared-modules/MTREADME.md.MT.sh b/shared-modules/MTREADME.md.MT.sh index 1148c9d4..b2e431fd 100755 --- a/shared-modules/MTREADME.md.MT.sh +++ b/shared-modules/MTREADME.md.MT.sh @@ -25,7 +25,7 @@ checkResult $?; AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi @@ -34,7 +34,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -61,7 +61,7 @@ fi PKG=$(head -n 1 $PKG_FILE); if [ -z "$PKG" ]; then - echo "$PKG is empty!"; + echo "PKG is empty!"; exit 1; fi diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh index c566d543..4e9122a4 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh @@ -45,13 +45,13 @@ fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi @@ -60,7 +60,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -90,7 +90,7 @@ if [ ! -f "$SOURCE_URL_FILE" ]; then fi SOURCE_URL=$(head -n 1 $SOURCE_URL_FILE); if [ -z "$SOURCE_URL" ]; then - echo "$SOURCE_URL is empty!"; + echo "SOURCE_URL is empty!"; exit 1; fi @@ -111,7 +111,7 @@ if [ ! -f "$CITIES_FILE" ]; then fi CITIES_LABEL=$(head -n 1 $CITIES_FILE); if [ -z "$CITIES_LABEL" ]; then - echo "$CITIES_LABEL is empty!"; + echo "CITIES_LABEL is empty in '$CITIES_FILE'!"; exit 1; fi @@ -331,6 +331,11 @@ setFeatureFlags; GTFS_RT_FILE="${VALUES_DIR}/gtfs_real_time_values.xml"; if [ -f "${GTFS_RT_FILE}" ]; then RT_PARTS=() + if grep -q "gtfs_real_time_agency_trip_updates_url" "${GTFS_RT_FILE}"; then + if [[ "${F_EXPORT_GTFS_RT_TRIP_UPDATES_PROVIDER}" == "true" ]]; then + RT_PARTS+=(" next departures") + fi + fi if grep -q "gtfs_real_time_agency_service_alerts_url" "${GTFS_RT_FILE}"; then RT_PARTS+=(" service alerts") fi @@ -389,7 +394,7 @@ EOL PERMISSIONS_LINE=""; if [ -f "${BIKE_STATION_FILE}" ]; then - if [ -z "$PERMISSIONS_LINES" ]; then + if [ -z "$PERMISSIONS_LINE" ]; then echo "" >> "${FULL_DESCRIPTION_FILE}"; echo "Permissions:" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; @@ -401,7 +406,7 @@ if [ -f "${BIKE_STATION_FILE}" ]; then fi if [ -f "${GTFS_RT_FILE}" ]; then - if [ -z "$PERMISSIONS_LINES" ]; then + if [ -z "$PERMISSIONS_LINE" ]; then echo "" >> "${FULL_DESCRIPTION_FILE}"; echo "Permissions:" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; @@ -409,7 +414,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then else PERMISSIONS_LINE="${PERMISSIONS_LINE} and"; fi - PERMISSIONS_LINE="${PERMISSIONS_LINE} real-time service alerts"; + PERMISSIONS_LINE="${PERMISSIONS_LINE} real-time information"; fi if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then if [ -z "$PERMISSIONS_LINE" ]; then diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh index 287a7058..ab156a89 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh @@ -43,7 +43,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; + exit 1; +fi + +AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); +if [ -z "$AGENCY_NAME_SHORT" ]; then + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -52,13 +58,11 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi -AGENCY_LABEL=$AGENCY_NAME_LONG; - requireCommand "xmllint" "libxml2-utils"; requireCommand "jq"; @@ -111,12 +115,13 @@ if [ -f "$AGENCY_TYPE_FILE" ]; then fi fi -SHORT_DESC="$AGENCY_NAME_LONG $TYPE_LABEL for MonTransit."; - +AGENCY_LABEL=$AGENCY_NAME_SHORT; if [ -n "$AGENCY_LOCATION_SHORT" ]; then - SHORT_DESC="$AGENCY_LOCATION_SHORT $SHORT_DESC" + AGENCY_LABEL="$AGENCY_LOCATION_SHORT $AGENCY_LABEL" fi +SHORT_DESC="$AGENCY_LABEL $TYPE_LABEL for MonTransit."; + if [ -f "$BIKE_STATION_VALUES_FILE" ]; then SHORT_DESC="${SHORT_DESC} Availability."; fi @@ -129,6 +134,7 @@ setFeatureFlags; GTFS_RT_FILE="${VALUES_DIR}/gtfs_real_time_values.xml"; if [ -f "${GTFS_RT_FILE}" ]; then + SHORT_DESC="${SHORT_DESC} Real-Time."; if grep -q "gtfs_real_time_agency_service_alerts_url" "${GTFS_RT_FILE}"; then SHORT_DESC="${SHORT_DESC} Alerts."; fi @@ -137,7 +143,13 @@ if [ -f "${GTFS_RT_FILE}" ]; then SHORT_DESC="${SHORT_DESC} Vehicles."; fi fi + if grep -q "gtfs_real_time_agency_trip_updates_url" "${GTFS_RT_FILE}"; then + if [[ "${F_EXPORT_GTFS_RT_TRIP_UPDATES_PROVIDER}" == "true" ]]; then + SHORT_DESC="${SHORT_DESC} Departures."; + fi + fi fi +# TODO: support other real-time providers RSS_FILE="${VALUES_DIR}/rss_values.xml"; TWITTER_FILE="${VALUES_DIR}/twitter_values.xml"; diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh index 53c1c246..fdea6a3e 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh @@ -48,7 +48,7 @@ fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -57,7 +57,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh index 123af642..9f681913 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh @@ -54,7 +54,7 @@ fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -100,7 +100,7 @@ if [ ! -f "$CITIES_FILE" ]; then fi CITIES_LABEL=$(head -n 1 $CITIES_FILE); if [ -z "$CITIES_LABEL" ]; then - echo "$CITIES_LABEL is empty!"; + echo "CITIES_LABEL is empty in '$CITIES_FILE'!"; exit 1; fi diff --git a/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh index 76f93c3e..f34f496a 100755 --- a/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh @@ -44,7 +44,10 @@ if [ ! -d "$CONFIG_DIR" ]; then exit 1; fi -AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +AGENCY_NAME_FILE="${CONFIG_DIR}/fr/agency_name"; +if [ ! -f "$AGENCY_NAME_FILE" ]; then + AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +fi if [ ! -f "$AGENCY_NAME_FILE" ]; then echo "$AGENCY_NAME_FILE doesn't exist!"; exit 1; @@ -52,13 +55,13 @@ fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi @@ -67,7 +70,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -90,7 +93,10 @@ fi GIT_OWNER="mtransitapps"; #TODO extract de GIT_REMOTE_URL=$(git config --get remote.origin.url); # 'git@github.com:owner/repo.git' or 'https://github.com/owner/repo'. CONTACT_WEBSITE_URL="https://github.com/$GIT_OWNER/$PROJECT_NAME"; -SOURCE_URL_FILE="${CONFIG_DIR}/source_url_fr"; +SOURCE_URL_FILE="${CONFIG_DIR}/fr/source_url"; +if [ ! -f "$SOURCE_URL_FILE" ]; then + SOURCE_URL_FILE="${CONFIG_DIR}/source_url_fr"; # Deprecated +fi if [ ! -f "$SOURCE_URL_FILE" ]; then SOURCE_URL_FILE="${CONFIG_DIR}/source_url"; fi @@ -100,7 +106,7 @@ if [ ! -f "$SOURCE_URL_FILE" ]; then fi SOURCE_URL=$(head -n 1 $SOURCE_URL_FILE); if [ -z "$SOURCE_URL" ]; then - echo "$SOURCE_URL is empty!"; + echo "SOURCE_URL is empty!"; exit 1; fi @@ -121,7 +127,7 @@ if [ ! -f "$CITIES_FILE" ]; then fi CITIES_LABEL=$(head -n 1 $CITIES_FILE); if [ -z "$CITIES_LABEL" ]; then - echo "$CITIES_LABEL is empty!"; + echo "CITIES_LABEL is empty in '$CITIES_FILE'!"; exit 1; fi @@ -335,6 +341,11 @@ setFeatureFlags; GTFS_RT_FILE="${VALUES_DIR}/gtfs_real_time_values.xml"; if [ -f "${GTFS_RT_FILE}" ]; then RT_PARTS=() + if grep -q "gtfs_real_time_agency_trip_updates_url" "${GTFS_RT_FILE}"; then + if [[ "${F_EXPORT_GTFS_RT_TRIP_UPDATES_PROVIDER}" == "true" ]]; then + RT_PARTS+=(" prochains départs") + fi + fi if grep -q "gtfs_real_time_agency_service_alerts_url" "${GTFS_RT_FILE}"; then RT_PARTS+=(" alertes de service") fi @@ -393,7 +404,7 @@ EOL PERMISSIONS_LINE=""; if [ -f "${BIKE_STATION_FILE}" ]; then - if [ -z "$PERMISSIONS_LINES" ]; then + if [ -z "$PERMISSIONS_LINE" ]; then echo "" >> "${FULL_DESCRIPTION_FILE}"; echo "Autorisations :" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; @@ -405,7 +416,7 @@ if [ -f "${BIKE_STATION_FILE}" ]; then fi if [ -f "${GTFS_RT_FILE}" ]; then - if [ -z "$PERMISSIONS_LINES" ]; then + if [ -z "$PERMISSIONS_LINE" ]; then echo "" >> "${FULL_DESCRIPTION_FILE}"; echo "Autorisations :" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; @@ -413,7 +424,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then else PERMISSIONS_LINE="${PERMISSIONS_LINE} et des"; fi - PERMISSIONS_LINE="${PERMISSIONS_LINE} alertes de service en temps-réel"; + PERMISSIONS_LINE="${PERMISSIONS_LINE} information en temps-réel"; fi if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then if [ -z "$PERMISSIONS_LINE" ]; then diff --git a/shared-modules/app-android/src/main/play/listings/fr-FR/MTshort-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/fr-FR/MTshort-description.txt.MT.sh index fa29f0c9..47d09b7a 100755 --- a/shared-modules/app-android/src/main/play/listings/fr-FR/MTshort-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/fr-FR/MTshort-description.txt.MT.sh @@ -42,7 +42,10 @@ if [ ! -d "$CONFIG_DIR" ]; then exit 1; fi -AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +AGENCY_NAME_FILE="${CONFIG_DIR}/fr/agency_name"; +if [ ! -f "$AGENCY_NAME_FILE" ]; then + AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +fi if [ ! -f "$AGENCY_NAME_FILE" ]; then echo "$AGENCY_NAME_FILE doesn't exist!"; exit 1; @@ -50,7 +53,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; + exit 1; +fi + +AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); +if [ -z "$AGENCY_NAME_SHORT" ]; then + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -59,13 +68,11 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi -AGENCY_LABEL=$AGENCY_NAME_LONG; - requireCommand "xmllint" "libxml2-utils"; requireCommand "jq"; @@ -110,7 +117,7 @@ else exit 1 # error fi -AGENCY_LABEL=$AGENCY_NAME_LONG; +AGENCY_LABEL=$AGENCY_NAME_SHORT; if [ -n "$AGENCY_LOCATION_SHORT" ]; then AGENCY_LABEL="$AGENCY_LABEL de $AGENCY_LOCATION_SHORT" fi @@ -129,6 +136,7 @@ setFeatureFlags; GTFS_RT_FILE="${VALUES_DIR}/gtfs_real_time_values.xml"; if [ -f "${GTFS_RT_FILE}" ]; then + SHORT_DESC="${SHORT_DESC} Temps-Réel."; if grep -q "gtfs_real_time_agency_service_alerts_url" "${GTFS_RT_FILE}"; then SHORT_DESC="${SHORT_DESC} Alertes."; fi @@ -137,7 +145,13 @@ if [ -f "${GTFS_RT_FILE}" ]; then SHORT_DESC="${SHORT_DESC} Véhicules."; fi fi + if grep -q "gtfs_real_time_agency_trip_updates_url" "${GTFS_RT_FILE}"; then + if [[ "${F_EXPORT_GTFS_RT_TRIP_UPDATES_PROVIDER}" == "true" ]]; then + SHORT_DESC="${SHORT_DESC} Départs."; + fi + fi fi +# TODO: support other real-time providers RSS_FILE="${VALUES_DIR}/rss_values.xml"; TWITTER_FILE="${VALUES_DIR}/twitter_values.xml"; diff --git a/shared-modules/app-android/src/main/play/listings/fr-FR/MTtitle.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/fr-FR/MTtitle.txt.MT.sh index 0c603557..25f3966f 100755 --- a/shared-modules/app-android/src/main/play/listings/fr-FR/MTtitle.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/fr-FR/MTtitle.txt.MT.sh @@ -41,7 +41,10 @@ if [ ! -d "$CONFIG_DIR" ]; then exit 1; fi -AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +AGENCY_NAME_FILE="${CONFIG_DIR}/fr/agency_name"; +if [ ! -f "$AGENCY_NAME_FILE" ]; then + AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +fi if [ ! -f "$AGENCY_NAME_FILE" ]; then echo "$AGENCY_NAME_FILE doesn't exist!"; exit 1; @@ -55,7 +58,7 @@ fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -64,7 +67,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi diff --git a/shared-modules/app-android/src/main/res/values-fr/MTbike_station_strings.xml.MT.sh b/shared-modules/app-android/src/main/res/values-fr/MTbike_station_strings.xml.MT.sh index d69451fb..37888fa0 100755 --- a/shared-modules/app-android/src/main/res/values-fr/MTbike_station_strings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values-fr/MTbike_station_strings.xml.MT.sh @@ -48,7 +48,10 @@ if [ ! -d "$CONFIG_DIR" ]; then exit 1; fi -AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +AGENCY_NAME_FILE="${CONFIG_DIR}/fr/agency_name"; +if [ ! -f "$AGENCY_NAME_FILE" ]; then + AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +fi if [ ! -f "$AGENCY_NAME_FILE" ]; then echo "$AGENCY_NAME_FILE doesn't exist!"; exit 1; @@ -56,13 +59,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi diff --git a/shared-modules/app-android/src/main/res/values-fr/MTstrings.xml.MT.sh b/shared-modules/app-android/src/main/res/values-fr/MTstrings.xml.MT.sh index f5d0a172..b55d0b8c 100755 --- a/shared-modules/app-android/src/main/res/values-fr/MTstrings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values-fr/MTstrings.xml.MT.sh @@ -42,7 +42,10 @@ if [ ! -d "$CONFIG_DIR" ]; then exit 1; fi -AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +AGENCY_NAME_FILE="${CONFIG_DIR}/fr/agency_name"; +if [ ! -f "$AGENCY_NAME_FILE" ]; then + AGENCY_NAME_FILE="${CONFIG_DIR}/agency_name"; +fi if [ ! -f "$AGENCY_NAME_FILE" ]; then echo "$AGENCY_NAME_FILE doesn't exist!"; exit 1; @@ -50,13 +53,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -93,7 +96,7 @@ elif [ "$TYPE" -eq 1 ]; then # SUBWAY elif [ "$TYPE" -eq 2 ]; then # TRAIN TYPE_LABEL="trains"; elif [ "$TYPE" -eq 3 ]; then # BUS - TYPE_LABEL="bus"; + TYPE_LABEL="autobus"; elif [ "$TYPE" -eq 4 ]; then # FERRY TYPE_LABEL="bateaux"; elif [ "$TYPE" -eq 100 ]; then # BIKE @@ -108,7 +111,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -144,8 +147,8 @@ cat >>"${STRINGS_FILE}" < - MonTransit $AGENCY_NAME_LONG $TYPE_LABEL ($LOCATION_LABEL) - Données des $TYPE_LABEL de $AGENCY_NAME_LONG à $LOCATION_LABEL pour MonTransit. + MonTransit $AGENCY_NAME_SHORT $TYPE_LABEL ($LOCATION_LABEL) + Données des $TYPE_LABEL de $AGENCY_NAME_LONG ($LOCATION_LABEL) pour MonTransit. EOL diff --git a/shared-modules/app-android/src/main/res/values/MTbike_station_strings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTbike_station_strings.xml.MT.sh index 65e34e73..24fa5d6f 100755 --- a/shared-modules/app-android/src/main/res/values/MTbike_station_strings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTbike_station_strings.xml.MT.sh @@ -49,13 +49,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi diff --git a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh index f60dba07..b1eb3dba 100755 --- a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh @@ -49,13 +49,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi diff --git a/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh index db4788c3..a0ef8886 100755 --- a/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh @@ -43,13 +43,13 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi AGENCY_NAME_SHORT=$(head -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_SHORT" ]; then - echo "$AGENCY_NAME_SHORT is empty!"; + echo "AGENCY_NAME_SHORT is empty!"; exit 1; fi @@ -108,7 +108,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -144,7 +144,7 @@ cat >>"${STRINGS_FILE}" < - MonTransit $AGENCY_NAME_LONG $TYPE_LABEL ($LOCATION_LABEL) + MonTransit $AGENCY_NAME_SHORT $TYPE_LABEL ($LOCATION_LABEL) $LOCATION_LABEL $AGENCY_NAME_LONG $TYPE_LABEL data for MonTransit. EOL diff --git a/shared-modules/gh_repo_update_details.sh b/shared-modules/gh_repo_update_details.sh index 111ef3d2..303ba185 100755 --- a/shared-modules/gh_repo_update_details.sh +++ b/shared-modules/gh_repo_update_details.sh @@ -18,7 +18,7 @@ fi AGENCY_NAME_LONG=$(tail -n 1 $AGENCY_NAME_FILE); if [ -z "$AGENCY_NAME_LONG" ]; then - echo "$AGENCY_NAME_LONG is empty!"; + echo "AGENCY_NAME_LONG is empty!"; exit 1; fi @@ -27,7 +27,7 @@ AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then AGENCY_LOCATION_SHORT=$(head -n 1 $AGENCY_LOCATION_FILE); if [ -z "$AGENCY_LOCATION_SHORT" ]; then - echo "$AGENCY_LOCATION_SHORT is empty!"; + echo "AGENCY_LOCATION_SHORT is empty!"; exit 1; fi fi @@ -54,7 +54,7 @@ fi PKG=$(head -n 1 $PKG_FILE); if [ -z "$PKG" ]; then - echo "$PKG is empty!"; + echo "PKG is empty!"; exit 1; fi diff --git a/shared/.idea/codeStyles/Project.xml b/shared/.idea/codeStyles/Project.xml index 51722edf..bcbfdfc1 100644 --- a/shared/.idea/codeStyles/Project.xml +++ b/shared/.idea/codeStyles/Project.xml @@ -55,6 +55,11 @@