| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function help_createLanguageLayout { |
| |
| |
| local COUNTER=0 |
| local MESSAGE='' |
| |
| |
| local DOCTPL[0]="`gettext "Set the document's title"`" |
| local DOCTPL[1]="`gettext "Set the document's subtitle"`" |
| local DOCTPL[2]="`gettext "Set the document's description"`" |
| local DOCTPL[3]="`gettext "Set the document's author"`" |
| |
| |
| |
| |
| |
| |
| |
| |
| for MESSAGE in "${DOCTPL[@]}";do |
| cli_printMessage "`gettext "Step"` ${COUNTER}: $MESSAGE:" "AsRequestLine" |
| read DOCTPL[${COUNTER}] |
| if [[ ! $DOCTPL[${COUNTER}] =~ '[[:print:]]+' ]];then |
| cli_printMessage "`gettext "The string entered isn't valid."`" |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| COUNTER=$(($COUNTER + 1)) |
| done |
| |
| |
| |
| |
| local LANGNAME=$(cli_getLangName $(cli_getCurrentLocale)) |
| |
| |
| if [[ ! -d ${MANUALS_DIR[2]} ]];then |
| mkdir -p ${MANUALS_DIR[2]} |
| fi |
| |
| |
| |
| cat ${MANUALS_DIR[6]}/repository.texi \ |
| | sed -r "s!=TITLE=!${DOCTPL[0]}!g" \ |
| | sed -r "s!=SUBTITLE=!${DOCTPL[1]}!g" \ |
| | sed -r "s!=DESCRIPTION=!${DOCTPL[2]}!g" \ |
| | sed -r "s!=AUTHOR=!${DOCTPL[3]}!g" \ |
| | sed -r "s!=LANGUAGE=!$(cli_getLangCodes $(cli_getCurrentLocale))!g" \ |
| > ${MANUALS_DIR[2]}/repository.texi |
| |
| |
| cp ${MANUALS_DIR[6]}/$(basename ${MANUALS_FILE[2]}) ${MANUALS_DIR[2]}/ |
| cp ${MANUALS_DIR[6]}/$(basename ${MANUALS_FILE[3]}) ${MANUALS_DIR[2]}/ |
| cp ${MANUALS_DIR[6]}/$(basename ${MANUALS_FILE[11]}) ${MANUALS_DIR[2]}/ |
| |
| |
| |
| |
| |
| sed -r -i "s!Index!`gettext "Index"`!" ${MANUALS_FILE[11]} ${MANUALS_FILE[2]} |
| |
| |
| cli_printMessage "`eval_gettext "The \\\"\\\$LANGNAME\\\" documentation structure has been created."`" |
| |
| } |
| |