Commit 5eef1270 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #40645 from brendandburns/fr

Automatic merge from submit-queue Add initial french translations for kubectl Add initial French translations, mostly as an example of how to add a new language. @fabianofranz @kubernetes/sig-cli-pr-reviews
parents 9ae2dfac 45ade78e
...@@ -34,6 +34,7 @@ var knownTranslations = map[string][]string{ ...@@ -34,6 +34,7 @@ var knownTranslations = map[string][]string{
"kubectl": { "kubectl": {
"default", "default",
"en_US", "en_US",
"fr_FR",
}, },
// only used for unit tests. // only used for unit tests.
"test": { "test": {
......
...@@ -8,6 +8,8 @@ This is a basic sketch of the workflow needed to add translations: ...@@ -8,6 +8,8 @@ This is a basic sketch of the workflow needed to add translations:
Create `translations/kubectl/<language>/LC_MESSAGES/k8s.po`. There's Create `translations/kubectl/<language>/LC_MESSAGES/k8s.po`. There's
no need to update `translations/test/...` which is only used for unit tests. no need to update `translations/test/...` which is only used for unit tests.
There is an example [PR here](https://github.com/kubernetes/kubernetes/pull/40645) which adds support for French.
Move on to Adding new translations Move on to Adding new translations
## Adding new translations ## Adding new translations
...@@ -24,6 +26,11 @@ Run `./hack/generate-bindata.sh, this will turn the translation files ...@@ -24,6 +26,11 @@ Run `./hack/generate-bindata.sh, this will turn the translation files
into generated code which will in turn be packaged into the Kubernetes into generated code which will in turn be packaged into the Kubernetes
binaries. binaries.
## Extracting strings
There is a script in `translations/extract.py` that knows how to do some
simple extraction. It needs a lot of work.
# Using translations # Using translations
To use translations, you simply need to add: To use translations, you simply need to add:
......
# Test translations for unit tests.
# Copyright (C) 2016
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: gettext-go-examples-hello\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
"PO-Revision-Date: 2017-01-29 22:54-0800\n"
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.10\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Language-Team: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
msgctxt "Update the annotations on a resource"
msgid "Update the annotations on a resource"
msgstr "Mettre à jour les annotations d'une ressource"
msgctxt ""
"watch is only supported on individual resources and resource collections - "
"%d resources were found"
msgid ""
"watch is only supported on individual resources and resource collections - "
"%d resources were found"
msgid_plural ""
"watch is only supported on individual resources and resource collections - "
"%d resources were found"
msgstr[0] ""
"watch n'est compatible qu'avec les ressources individuelles et les "
"collections de ressources. - %d ressource a été trouvée. "
msgstr[1] ""
"watch n'est compatible qu'avec les ressources individuelles et les "
"collections de ressources. - %d ressources ont été trouvées. "
# https://github.com/kubernetes/kubernetes/blob/masterpkg/kubectl/cmd/apply.go#L98
msgctxt "Apply a configuration to a resource by filename or stdin"
msgid "Apply a configuration to a resource by filename or stdin"
msgstr ""
"Appliquer une configuration à une ressource par nom de fichier ou depuis "
"stdin"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/config.go#L39
msgctxt "Modify kubeconfig files"
msgid "Modify kubeconfig files"
msgstr "Modifier des fichiers kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_authinfo.go#L103
msgctxt "Sets a user entry in kubeconfig"
msgid "Sets a user entry in kubeconfig"
msgstr "Définit un utilisateur dans kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_cluster.go#L67
msgctxt "Sets a cluster entry in kubeconfig"
msgid "Sets a cluster entry in kubeconfig"
msgstr "Définit un cluster dans kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_context.go#L57
msgctxt "Sets a context entry in kubeconfig"
msgid "Sets a context entry in kubeconfig"
msgstr "Définit un contexte dans kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/current_context.go#L48
msgctxt "Displays the current-context"
msgid "Displays the current-context"
msgstr "Affiche le contexte actuel"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_cluster.go#L38
msgctxt "Delete the specified cluster from the kubeconfig"
msgid "Delete the specified cluster from the kubeconfig"
msgstr "Supprimer le cluster spécifié du kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_context.go#L38
msgctxt "Delete the specified context from the kubeconfig"
msgid "Delete the specified context from the kubeconfig"
msgstr "Supprimer le contexte spécifié du kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_clusters.go#L40
msgctxt "Display clusters defined in the kubeconfig"
msgid "Display clusters defined in the kubeconfig"
msgstr "Afficher les cluster définis dans kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_contexts.go#L62
msgctxt "Describe one or many contexts"
msgid "Describe one or many contexts"
msgstr "Décrire un ou plusieurs contextes"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/set.go#L59
msgctxt "Sets an individual value in a kubeconfig file"
msgid "Sets an individual value in a kubeconfig file"
msgstr "Définit une valeur individuelle dans un fichier kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/unset.go#L47
msgctxt "Unsets an individual value in a kubeconfig file"
msgid "Unsets an individual value in a kubeconfig file"
msgstr "Supprime une valeur individuelle dans un fichier kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/use_context.go#L48
msgctxt "Sets the current-context in a kubeconfig file"
msgid "Sets the current-context in a kubeconfig file"
msgstr "Définit le contexte courant dans un fichier kubeconfig"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/view.go#L64
msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
msgstr ""
"Afficher les paramètres fusionnés de kubeconfig ou d'un fichier kubeconfig "
"spécifié"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment