#!/bin/bash
#
# Kanotix-Update-GUI - Locale: English
#

# Errors

ERR_DOWNLOAD="An error occoured while downloading"
ERR_GTK_1="In ~/.kde/share/config/gtkrc an error has been found:"
ERR_GTK_2="Do you want to automagically comment out this line?\n(If you don't, the Xdialog-menus might not work properly)"
ERR_GTK_3="So you don't.\n\nDo you want do disable this question?\n(Otherwise it would appear at every start of Kanotix-Update-GUI)"

# Main-Menu

MENU_MAIN_TITLE="main menu:"

MENU_MAIN_ITEM_INFO="info"
MENU_MAIN_ITEM_WARNINGS="upgrade-news/-warnings"
MENU_MAIN_ITEM_KERNELUPDATE="update kernel"
MENU_MAIN_ITEM_DISTUPGRADE="dist-upgrade"
MENU_MAIN_ITEM_NETUPDATE="network update"
MENU_MAIN_ITEM_KANOSCRIPTUPDATE="update Kano's scripts"

MENU_MAIN_ITEM_APTUPDATE="apt-get update"
MENU_MAIN_ITEM_APTADDSOURCES="add apt-sources"
MENU_MAIN_ITEM_INSTALLPACKAGES="install new software"
MENU_MAIN_ITEM_KUGUIUPDATE="update Kanotix-Update-GUI"

MENU_MAIN_ITEM_HELP="help"
MENU_MAIN_ITEM_END="exit"

# Network-Update-Menu

MENU_NET_TITLE="network update\nPlease select:"

MENU_NET_ITEM_README="readme"
MENU_NET_ITEM_SERVER="dist-upgrade (provide package list as server)"
MENU_NET_ITEM_CLIENT="dist-upgrade (use another server's package list as client)"
MENU_NET_ITEM_BACK="back"

# Info-Dialog

INFO_DIALOG="This script is explicitely declared experimental!
I can't give any warranty!

Any use of the script is at your own risk!

For further information visit
www.andreas-loibl.de"

# Status-Text

STATUS_DOWNLOAD_FILE="Downloading file"
STATUS_UPDATING_KANO="Updating Kano's Scripts..."

# Kernel-Update

KU_MKIMAGE_1="Warning: the following line was found in your /etc/mkinitrd/mkinitrd.conf:"
KU_MKIMAGE_2="The Kanotix wiki claims that this is wrong and has to be repaired manually. For more information see:

http://wiki.kanotix.net/CoMa.php?CoMa=Kanotix-Kernel-UpdateEN"

KU_DLG_AUTODL="Search for newest kernel automagically?\n\n(If you select 'No' you have to enter the URLs manually)"
KU_DLG_KERNELURL="Enter the URL to kernel file"
KU_DLG_DRIVERURL="Enter the URL to driver file

(if you don't want to install additional drivers, select 'Cancel')"

KU_DLG_SELECT_KERNEL="Select kernel:"
KU_DLG_SELECT_DRIVER="Select additional drivers:

(select 'Cancel' if you don't want
to install additional drivers)"

KU_DLG_DLASK_1="The following files will be downloaded now:"
KU_DLG_DLASK_2="Do you want to continue?"

KU_DLG_CONTINUE="Do you want to continue the kernel update now?"

KU_DLG_PACKAGES="What packages do you want to install?"

KU_TEXT__YOU_HAVE_TO_REBOOT="The computer has to restart now.

After the reboot some more things have to be done to complete the
update. Kanotix-Update-GUI can do this automagically by starting
itself after the next boot.

If you select 'No' the script exits and you have to do the rest
yourself. Find further instructions in the Kanotix wiki
(http://wiki.kanotix.net/CoMa.php?CoMa=Kanotix-Kernel-UpdateEN)

Do you want to continue automagically? ('No' exits the script)"

# Die notwendigen nderungen am Bootprozess wurden automatisch
# vorgenommen und beim nchsten Boot wird Kanotix-Update-GUI automatisch
# gestartet werden.
# 
# Dort knnen Sie dann auch ganz einfach Grafikkartentreiber und
# Soundkarteneinstellungen vornehmen. Dazu muss jetzt nur noch der
# Computer neu gestartet werden. Speichern Sie deshalb alles ab und
# beenden Sie alle anderen laufenden Programme.
# 
# Wenn Sie wollen, dass Kanotix-Update-GUI den Computer automatisch
# neu startet klicken Sie bitte auf Ja, ansonsten auf Nein
# 
# Soll der Computer jetzt neu gestartet werden?
KU_TEXT__CHANGES_ARE_DONE_REBOOT_NOW="Kanotix-Update-GUI
will be started automagically after rebooting. 

There you can also install graphics drivers and configure your sound card.
The computer has to be restarted. Save all open files
and close all other running applications.

If you want Kanotix-Update-GUI to restart your computer
select 'Yes', otherwise select 'No'.

Restart the computer now?
"

DU_TEXT__PREINFO="dist-upgrade

A dist-upgrade works as follows: first a list of packages to be updated 
will be created. Second these files will be downloaded. While downloading
you can use the computer as usual - you will be informed, when the download
finishes. As the actual upgrading process will be executed in runlevel 3
you will have to save all open files and close all running applications at
that point.
After finishing the dist-upgrade the computer will switch back to runlevel 5 and 
you can continue where you left off.

Do you want to do a dist-upgrade as explained above?"

DU_DLG_NOTHINGTOUPDATE="There are no packages to update!\n\nLooks like we're done ;)"

DU_TEXT__ASK_FOR_INIT3="dist-upgrade

All packages to be updated have been downloaded to your computer - so we're ready to start the upgrading process. 
As this will be executed in runlevel 3, you should now save all open files and close all running applications.

Switch to runlevel 3 and start the dist-upgrade?"

DU_USK_NOT_INSTALLED="The script update-scripts-kanotix.sh is missing!\n\nTherefore the update cannot be continued."

AU_ERROR="An error has occoured! Do you want to try apt-get update again? [Y/n]"

# Network-Update
NU_TEXT__README="network update readme

Running the update in server mode (selection S) will create a list of all deb files
in your apt-cache (/var/cache/apt/) and store it in a file Packages. Additionally your 
apt-cache will be shared by NFS. For details see the respective manpages of exports and nfs. 

Running the update as client (selection C) will ask you for the server's IP number. It 
will mount the server's apt-cache (aka /var/cache/apt/) to /mnt/apt/ by NFS. Your
/etc/apt/sources.list will be backed up and the original file prepended by the entry

deb file:/mnt/apt archives/

Thus the following dist-upgrade will use the NFS connection to the server. Therefore the server
must not be powered down or disconnected, because in this case the missing files will be
retrieved from the internet.
"

NU_TEXT__ALREADY_SERVER="network update

Kanotix-Update-GUI has detected that this computer is currently sharing its deb
files for other computers to dist-upgrade (i.e.: there is a file Packages
and /var/cache/apt/ is shared by NFS).

Do you want to change this and delete the share?
"

NU_DLG_SHAREDELETED="The share has been removed now."

NU_EXPERIMENTAL_WARNING="NOTE: the network update mode is currently little tested and still experimental.\n\nThere is no guarantee for the thing to work and not to break anything!\n\nDo you want to proceed anyway?"

NU_SERVER_IP_1="network update

The package list has been created and shared. Now start Kanotix-Update-GUI on the other computer (client)
and select network update in client mode (selection C). You will be prompted for this server's IP number,
which is:"

NU_SERVER_IP_2="!!!! Important !!!!

During the dist-upgrade you MUST NOT power off or 
disconnect this computer (server)!
"

NU_TEXT__ALREADY_CLIENT="network update

Kanotix-Update-GUI has detected that this computer is configured to use
packages shared by another computer (i.e. it already is in client mode)

Do you want to change this and delete these settings?"

NU_DLG_OPTIONDELETED="The settings have been deleted."

NU_ENTER_SERVER_IP="Enter the server's IP number:"

NU_MOUNT_ERROR="An error occoured while mounting. The network update cannot be continued."

NU_DONE_1="network update

Kanotix-Update-GUI has configured your computer to use the server"

NU_DONE_2="as package repository.

You can now start the update.

Wnen the update is done and the computer has returned to runlevel 5,
simply start Kanotix-Update-GUI again and choose network update in 
client mode (selection C). You will then be asked if you want to undo
the system configuration changes and return your computer to its 
initial state (i.e. no longer using a server for upgrades).

Do you want to start the dist-upgrade now?
"

AS_TEXT__PREINFO="Here you can add new apt-sources to your /etc/apt/sources.list.
To this end a list with available sources will be downloaded from the internet.

Do you want to continue?"

AS_DLG_SECTIONS_AVAIL="The following sections are not yet activated on your computer.

Select the ones you want to add."

AS_DLG_ASK_CONTINUE="The selected sections will be added to your

/etc/apt/sources.list

Do you want to continue?"

AS_DONE_DO_AU="The new sections were added and will be available after
an 'apt-get update'.

Do you want to execute 'apt-get update' now?"

# install packages

IP_TEXT__PREINFO="install new software

This feature lets you install those packages already present
in newer kanotix versions. It will retrieve a package list from the internet,
compare it with the packages already installed on your computer and 
allow you to select which of these files to install.

Do you want to continue?"

STATUS_GENERATING_PACKAGE_LIST="Creating list of packages...\n\nplease wait..."

IP_EVERYTHING_ALREADY_INSTALLED="All packages are already installed on your computer!"

IP_DLG_SOFTWARE_AVAIL="The following packages are included in the latest Kanotix release,\nbut missing on your system.\n\nWhich of them do you want to install?"

IP_SOURCES_1="To be able to retrieve certain software packages, additional sources have to be added
to your sources list. This can be done with Kanotix-Update-GUI by selecting 'add apt-sources' from 
the main menue. There you can select the missing sections and have them added to your /etc/apt/sources.list

The following sections are missing:"

IP_SOURCES_2="It is, though, also possible, that these sources actually are in your sources list,
but didn't get recognized (there has to be a comment line stating the section name right before 
the source line). So if you are sure that the source is already listed (e.g. because it doesn't
show up in 'add apt-sources') you can still proceed by selecting 'No'.

Do you want to cancel now?"

# upgrade-news/warnings
UP_TEXT__PREINFO="Upgrade-News/Warnings

Upgrade-News/Warnings can be fetched from the internet. You should read them before any upgrade
and use the tips given there or wait with the Upgrade until there is a better time for upgrading.

Source: http://www.andreas-loibl.de/linux/upgrade-news.en

Do you want to fetch the Upgrade-News/Warnings from the internet?"

# textmode - kernel update
TK_U1="Kanotix-Update-GUI is now committing the changes necessary after a kernel update, please stand by..."
TK_U2="Kanotix-Update-GUI is now committing the changes necessary after a kernel update.\n\nDo you want to proceed?"
TK_U3_M0="What do you want to do next?"
TK_U3_M1="Back (prev. menu)"
TK_U3_M2="Console (runlevel 3)"
TK_U3_M3="Graphical interface (aka X)"
TK_U3_M4="reboot computer"
TK_U3_M5="shut down computer"

TK_U4="Press <Enter> to log on to a console..."
TK_U5="Note: The recommended changes have NOT been committed yet.\n\nDo you really want to switch back to the graphical interface wechseln?"

TK_U6="Do you want to enable your boot splash in grub? [experimental]"

TK_U7_M0="Do you want to install graphics drivers for NVidia or ATI adapters?"
TK_U7_M1="No"
TK_U7_M2="install NVidia driver"
TK_U7_M3="install ATI driver"

TK_U8_M0="Connection to kanotix.com could not be established (ping failed)\n\nWhat do you want to do next? "
TK_U8_M1="Try again"
TK_U8_M2="Ignore error and start installation anyway"
TK_U8_M3="execute commend (e.g. pon <profile>)"
TK_U8_M4="Abort driver installation"

TK_U9="Enter commend to execute"

TU_U1="Kanotix-Update-GUI is now doing the dist-upgrade, please stand by..."
TU_U2="Kanotix-Update-GUI is now doing the dist-upgrade.\n\nDo you want to proceed?\n(selecting 'No' brings you back to the graphical interface)"
TU_U3="An error occurred during the dist-upgrade. Press <Enter> to display Kanotix-Update-GUI."
TU_U4="It will present you with a choice as to how to proceed."

TU_U5_M0="An error occurred,\nwhat do you want to do?"
TU_U5_M1="Display log"
TU_U5_M2="Repair by running 'apt-get -f install'"
TU_U5_N3="Open console (in runlevel 3)"
TU_U5_N4="Restart dist-upgrade"
TU_U5_N5="Nothing"

TU_U6_M0="Which log do you want to display?"
TU_U6_M1="Back"
TU_U6_M2="error log"
TU_U6_N3="installation log"
TU_U7="Bash will now be started. You can return to Kanotix-Update-GUI by pressing <Ctrl>+<D> or entering 'exit'."
TU_U8="Do you really want to leave it at that? Due to the error the dist-upgrade aborted. In virtually all cases this results in packages not being properly installed.\n\nIf you haven't done anything about this (options 2, 3 or 4), this may have serious consequences for further package management."

# Offline-Update

OF_U1="The Upgrade-Package has been created (Stage 1).\nPut this file onto the Computer connected to the internet and open it there.\nKanotix-Upgrade-GUI will do the downloads automatically and drop a second \nUpgrade-Package (Stage 2). This file has to be copied back to *this* computer.\nOpen it and the Upgrade will be done (automatically)."
OF_U2="Kanotix-Update-GUI has done all the downloads successfully and dropped a second \nUpgrade-Package (Stage 2). This file has to be copied back to the computer from which the Stage-1 file was from.\nOpen it there and the Upgrade will be done (automatically).\n\nDo you want to start Kanotix-Update-GUI on this computer now?"
OF_U3="Extracting Contents of Offline-Upgrade-Package..."
OF_U4="There is something wrong with the Package..."
OF_U5="It doesn't say that we are at Stage-2.\n\nContinue?"
OF_U6="The Stage-1-File was from another computer.\n\nContinue?"
OF_U7="Updating..."
OF_U8="The upgrade finished successfully. Do you want to start Kanotix-Update-GUI now?"
OF_U9="This Package is not a valid Kanotix-Update-GUI-Offline-Upgrade-Package!"

OF_U0="What do you want to upgrade?"
OF_U0_M0="Package lists"
OF_U0_M1="Kernel-Update"
OF_U0_M2="Kanotix-Update-GUI"

# everything else ...

LOCALE__PATH_TO="Path to"
LOCALE__SELECT="Please select:"
LOCALE__WAIT="Please wait..."
