Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix language codes, add them to layout and fix Spanish #18984

Closed
wants to merge 1 commit into from

3 participants

Stefan Schüßler Jaime Marquínez Ferrándiz Jack Nagel
Stefan Schüßler

I've simplified the language codes for fr and es

The golden rule when creating language tags is to keep the tag as short as possible. Avoid region, script or other subtags except where they add useful distinguishing information.
http://www.w3.org/International/articles/language-tags/

Furthermore I've inserted the language code into the page's lang and xml:lang attributes and fixed a problem with the Spanish page (there was an unescaped colon).

Stefan Schüßler sos4nt Fix for language codes and Spanish
http://www.w3.org/International/articles/language-tags/
"The golden rule when creating language tags is to keep the tag as short as possible. Avoid region, script or other subtags except where they add useful distinguishing information."
7e28def
Jaime Marquínez Ferrándiz

It turns out that changing the xml:lang attributes makes Firefox display correctly the chinese characters, thanks!

Jack Nagel jacknagel closed this pull request from a commit
Stefan Schüßler sos4nt Fix for language codes and Spanish
http://www.w3.org/International/articles/language-tags/ "The golden rule
when creating language tags is to keep the tag as short as possible.
Avoid region, script or other subtags except where they add useful
distinguishing information."

Closes #18984.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
0583a47
Jack Nagel jacknagel closed this in 0583a47
Jack Nagel
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2013
  1. Stefan Schüßler

    Fix for language codes and Spanish

    sos4nt authored
    http://www.w3.org/International/articles/language-tags/
    "The golden rule when creating language tags is to keep the tag as short as possible. Avoid region, script or other subtags except where they add useful distinguishing information."
This page is out of date. Refresh to see the latest.
6 _config.yml
View
@@ -3,9 +3,9 @@ langs:
lang_string: English
- langcode: es
lang_string: Español
- - langcode: fr-fr
+ - langcode: fr
lang_string: Française
- - langcode: zh-cn
+ - langcode: zh-CN
lang_string: 简体中文
- - langcode: zh-tw
+ - langcode: zh-TW
lang_string: 繁體中文
4 _layouts/index.html
View
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ page.lang }}" lang="{{ page.lang }}">
<head>
<title>{{ page.title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -29,7 +29,7 @@
{% if page.lang == lang.langcode %}
{{ lang.lang_string }}
{% else %}
- <a href={% if lang.langcode == 'en' %}"index.html"{% else %}"index_{{ lang.langcode }}.html"{% endif %}>
+ <a href={% if lang.langcode == 'en' %}"index.html"{% else %}"index_{{ lang.langcode | downcase }}.html"{% endif %}>
{{ lang.lang_string }}
</a>
{% endif %}
4 index_es-es.html → index_es.html
View
@@ -1,6 +1,6 @@
---
layout: index
-lang: es-es
+lang: es
title: Homebrew — ¿MacPorts te lleva a la bebida? ¡Prueba Homebrew!
subtitle: El gestor de paquetes para OS X que faltaba
@@ -9,7 +9,7 @@
how: Homebrew instala cada paquete en su propio directorio, creando enlaces simbólicos a sus archivos dentro de <code>/usr/local</code>.
prefix: Homebrew nunca instala archivos fuera de su prefijo, y puedes colocar la instalación de Homebrew donde quieras.
createpackages: Crear tus propios paquetes de Homebrew no puede ser más fácil.
- hack: Homebrew está basado únicamente en Git y Ruby: ya puedes desarrollar tranquilo, con la seguridad de que podrás deshacer tus cambios e integrar actualizaciones con total facilidad.
+ hack: "Homebrew está basado únicamente en Git y Ruby: ya puedes desarrollar tranquilo, con la seguridad de que podrás deshacer tus cambios e integrar actualizaciones con total facilidad."
formula: "Las fórmulas de Homebrew son simples <i>scripts</i> en Ruby:"
complement: Homebrew complementa OS X. Instala tus <i>gems</i> con <code>gem</code> y sus dependencias con <code>brew</code>.
install:
2  index_fr-fr.html → index_fr.html
View
@@ -1,6 +1,6 @@
---
layout: index
-lang: fr-fr
+lang: fr
title: Homebrew — MacPorts vous rend agressif ? Essayez Homebrew !
subtitle: Le gestionnaire package pour OS X
2  index_zh-cn.html
View
@@ -1,6 +1,6 @@
---
layout: index
-lang: zh-cn
+lang: zh-CN
title: Homebrew — MacPorts让您崩溃不?试试Homebrew吧!
subtitle: OS X系统缺失的组件管理工具
2  index_zh-tw.html
View
@@ -1,6 +1,6 @@
---
layout: index
-lang: zh-tw
+lang: zh-TW
title: Homebrew - MacPorts 讓你抓狂嗎?試試 Homebrew 吧!
subtitle: OS X 缺少的套件管理工具
Something went wrong with that request. Please try again.