From 7210d1a2cfb33e870901629b2423a2f183c08954 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 27 Aug 2016 15:59:27 +0100 Subject: Initial i18n/l10n of gitano-setup --- lang/README | 36 ++++++++++++++++++++++++++++ lang/en.lua | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lang/json.lua | 10 ++++++++ 3 files changed, 122 insertions(+) create mode 100644 lang/README create mode 100644 lang/en.lua create mode 100644 lang/json.lua (limited to 'lang') diff --git a/lang/README b/lang/README new file mode 100644 index 0000000..9d0ec82 --- /dev/null +++ b/lang/README @@ -0,0 +1,36 @@ +This is the Gitano language pack tree. Files in here are installed into +Gitano's lang tree in the share directory. These files form the basis of +Gitano's i18n approach and are lazily loaded into a Tongue codex. + +Each language has to be parented properly. For Gitano to do this, there must +be a file called `langname.parent` whose content is the name of the language to +act as the parent language. If this file is absent, the following algorithm is +used: + +1. If the language is called 'json' then it has no parent +2. If the language matches [^_]+_[^_+] then it is parented to the language + of its prefix. E.g. en_GB is parented to en. +3. Otherwise the language is assumed be parented to 'en' in order that every + language will have translations of some kind. ('en' is the Gitano basic + language) + +This means that you only need special parenting for unusual languages such as +'en_PIRATE' which might inherit from 'en_GB' or 'en_CA' which might inherit +mostly from 'en_GB'. + +Languages in this directory are then files whose names are of the form: + + langname.lua + +These files are of the form: + + return { + TOKENNAME = "expansionstring", + ANOTHERTOKEN = "somemore strings", + } + +In addition, when loading plugins, Gitano will add (from the plugin tree) +pluginname_langname.lua to the list of files. They should be of the same form +as the above. + + diff --git a/lang/en.lua b/lang/en.lua new file mode 100644 index 0000000..6ea9002 --- /dev/null +++ b/lang/en.lua @@ -0,0 +1,76 @@ +-- en.lua +-- +-- English language pack base for Gitano (Basically en_GB) +-- +-- Copyright 2016 Daniel Silverstone +-- + +return { + -- The SETUP_ tokens are for the gitano-setup binary + SETUP_USAGE = [[ +usage: gitano-setup [...] + +This tool creates the basic repository setup for a Gitano instance. + +This is an interactive tool where if it has any questions for you, it will +visit each answers file in turn until it finds the answer. This means +that for automation purposes you can specify multiple answers files with +the earlier ones overriding the later ones. + +In summary, the behaviour is as follows: + +The repository root is created if it does not exist, and a gitano-admin.git +repository is created within it. Said repository is populated with the +example administration repository rules and an admin user and group. +]], + SETUP_DEBUG_PARSING_ANSWERS = "Parsing answers file: ${file}", + SETUP_DEBUG_COMBINE_ANSWERS = "Combining answers into conf...", + SETUP_WELCOME = "Welcome to the Gitano setup process", + SETUP_DO_CHECKS = "Performing system checks", + SETUP_CHECK_SUPPLE = "... Checking supple sandboxing", + SETUP_CHECK_SUPPLE_UNABLE = "... Supple unable to run trivial sandboxed code", + SETUP_CHECK_SUPPLE_VALUES = "... Supple unable to pass trivial values in and out", + SETUP_CHECK_SUPPLE_BIDIRECTIONAL = "... Supple unable to communicate bidirectionally", + SETUP_CHECK_FAILED = "... Unable to run supple test", + SETUP_CHECK_OK = "System checks out", + SETUP_SETTING_IS = "Setting: ${key} is ${value}", + SETUP_NOT_A_DIR = "${path}: not a directory", + SETUP_ERROR_INVALID_NAME = "Invalid name: ${name}", + SETUP_BATCH_MODE = "Batch mode engaged", + SETUP_INTERACTIVE_MODE = "Interactive mode engaged", + SETUP_STEP_1 = "Step 1: Determine everything", + SETUP_PATHS_HOME_INFO = "Home directory for new Gitano user", + SETUP_PATHS_SSH_INFO = "SSH directory for new Gitano user", + SETUP_PATHS_PUBKEY_INFO = "Public key file for admin user", + SETUP_PATHS_PUBKEY_NOT_FOUND = "Cannot find public key", + SETUP_PATHS_REPOS_INFO = "Repository path for new Gitano instance", + SETUP_ADMIN_USERNAME_INFO = "User name for admin user", + SETUP_ADMIN_REALNAME_INFO = "Real name for admin user", + SETUP_ADMIN_EMAIL_INFO = "Email address for admin user", + SETUP_ADMIN_KEYNAME_INFO = "Key name for administrator", + SETUP_SITE_NAME_INFO = "Site name", + SETUP_LOG_PREFIX_INFO = "Site log prefix", + SETUP_USE_HTPASSWD_INFO = "Store passwords with htpasswd? (needed for http authentication)", + SETUP_PATHS_SKEL_INFO = "Path to skeleton gitano-admin content", + SETUP_STEP_2 = "Step 2: Gather required content", + SETUP_PREP_SITE_CONFIG = "=> Prepare site config", + SETUP_ACQUIRE_SKEL = "=> Acquire skeleton gitano-admin", + SETUP_PREP_ADMIN_USER = "=> Preparing administration user (${user})", + SETUP_PREP_GITANO_ADMIN = "=> Preparing gitano-admin group", + SETUP_STEP_3 = "Step 3: Write out paths and gitano-admin.git", + SETUP_MAKE_PATHS = "=> Make paths", + SETUP_PREPARE_REPO = "=> Prepare repository", + SETUP_PREPARE_FLAT_TREE = "=> Create a flattened tree", + SETUP_PREPARE_COMMIT = "=> Commit that tree", + SETUP_PREPARE_MASTER = "=> Attach that commit to master", + SETUP_CHECK_ADMIN_REPO = "=> Ensure we can parse our resultant admin repository", + SETUP_ERROR_NO_USER = "Could not find user", + SETUP_ERROR_NOT_ADMIN = "User was not a gitano-admin", + SETUP_ADMIN_REF = "=> Change the admin ref for gitano-admin.git", + SETUP_WRITE_SSHKEYS = "=> Write the SSH authorized_keys file out", + SETUP_COMPLETED = "Gitano setup completed", + + -- General errors used in many scripts + ERROR_BAD_ADMIN_REPO = "Unable to find the HEAD of the administration repository. Cannot continue", + +} diff --git a/lang/json.lua b/lang/json.lua new file mode 100644 index 0000000..9d056ad --- /dev/null +++ b/lang/json.lua @@ -0,0 +1,10 @@ +-- json.lua +-- +-- JSON language pack base for Gitano +-- +-- Copyright 2016 Daniel Silverstone +-- + +return { + +} -- cgit v1.2.1