Skip to content

Commit

Permalink
automation
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 6, 2023
1 parent c39c01d commit ff72303
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 12 deletions.
19 changes: 10 additions & 9 deletions Marlin/src/lcd/language/language_fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,16 @@ namespace Language_fr {
LSTR MSG_SD_CARD = _UxGT("Carte SD");
LSTR MSG_USB_DISK = _UxGT("Clé USB");

LSTR MSG_IMPOSSIBLE_WHILE_PRINTING = _UxGT("Impossible pendant une impression");
LSTR MSG_IMPOSSIBLE_WHILE_IDLE = _UxGT("Impossible tant que l'imprimante est en attente");
LSTR MSG_NO_FILE_SELECTED = _UxGT("Aucun fichier selectionne");
LSTR MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
LSTR MSG_EXECUTING_COMMAND = _UxGT("Execution de la commande...");
LSTR MSG_BED_PID_DISABLED = _UxGT("Bed PID desactive");
LSTR MSG_PID_DISABLED = _UxGT("PID desactive");
LSTR MSG_PID_AUTOTUNING = _UxGT("Autocalibrage du PID...");
LSTR MSG_INVALID_RECOVERY_DATA = _UxGT("Donnees de recuperation non valides");
// DGUS-Specific message strings, not used elsewhere
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Impossible pendant une impression");
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Impossible tant que l'imprimante est en attente");
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Aucun fichier selectionne");
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Execution de la commande...");
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Bed PID desactive");
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID desactive");
LSTR DGUS_MSG_PID_AUTOTUNING = _UxGT("Autocalibrage du PID...");
LSTR DGUS_MSG_INVALID_RECOVERY_DATA = _UxGT("Donnees de recuperation non valides");

LSTR DGUS_MSG_HOMING_REQUIRED = _UxGT("Retour a l'origine necessaire...");
LSTR DGUS_MSG_BUSY = _UxGT("Occupe");
Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/lcd/language/language_fr_na.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
#define DISPLAY_CHARSET_ISO10646_1
#define NOT_EXTENDED_ISO10646_1_5X7

namespace Language_fr {
namespace Language_fr_na {
using namespace Language_en; // Inherit undefined strings from English

constexpr uint8_t CHARSIZE = 2;
LSTR LANGUAGE = _UxGT("Francais");

LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" prete.");
Expand Down Expand Up @@ -142,7 +141,7 @@ namespace Language_fr {
LSTR MSG_UBL_TOOLS = _UxGT("Outils UBL");
LSTR MSG_UBL_LEVEL_BED = _UxGT("Niveau lit unifie");
LSTR MSG_UBL_MANUAL_MESH = _UxGT("Maillage manuel");
LSTR MSG_UBL_BC_INSERT = _UxGT("Poser câle & mesurer");
LSTR MSG_UBL_BC_INSERT = _UxGT("Poser cale & mesurer");
LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mesure");
LSTR MSG_UBL_BC_REMOVE = _UxGT("oter et mesurer lit");
LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Aller au suivant");
Expand Down
39 changes: 39 additions & 0 deletions buildroot/share/fonts/make_lang_na.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
#
# make_lang_na.sh
#
# Create non-accented language files given a list of accented language files.
#

which gsed >/dev/null || { echo "gsed is required for this script." ; exit 1 ; }
which perl >/dev/null || { echo "perl is required for this script." ; exit 1 ; }

#
# Get language arguments
#
[ $# ] || { echo "One or more language codes (such as 'fr') must be supplied." ; exit 1 ; }

LANG_ARG="$@"

#
# Change to working directory 'Marlin'
#
OLDWD=`pwd`
[[ $(basename "$OLDWD") != 'Marlin' && -d "Marlin" ]] && cd Marlin
[[ -f "Configuration.h" ]] || { echo -n "cd to the 'Marlin' folder to run " ; basename $0 ; exit 1; }

#
# Generate a non-accented language file
#
for ALANG in $LANG_ARG ; do
echo "Generating a non-accented language for '${ALANG}'" >&2
OUTFILE=src/lcd/language/language_${ALANG}_na.h
cp src/lcd/language/language_${ALANG}.h $OUTFILE
perl -pi -e 's/\s*#define DISPLAY_CHARSET_.+\n*//g' $OUTFILE
perl -pi -e 's/\s*constexpr .+ CHARSIZE.+\n*//g' $OUTFILE
perl -pi -e "s/namespace Language_${ALANG}/#define DISPLAY_CHARSET_ISO10646_1\n#define NOT_EXTENDED_ISO10646_1_5X7\n\nnamespace Language_${ALANG}_na/" $OUTFILE
gsed -i 'y/āáǎàâäēéěèêīíǐìïîōóǒòöôūúǔùǖǘǚǜüûĀÁǍÀĒÉĚÈÊĪÍǏÌÎŌÓǑÒÔŪÚǓÙǕǗǙǛÜÛÇçÑñ/aaaaaaeeeeeiiiiiioooooouuuuuuuuuuAAAAEEEEEIIIIIOOOOOUUUUUUUUUUCcNn/' $OUTFILE
perl -pi -e 's/ß/ss/g' $OUTFILE
done

cd "$OLDWD"

0 comments on commit ff72303

Please sign in to comment.