Merged lang rename

This commit is contained in:
Phil Howard 2015-11-13 23:16:37 +00:00
parent d811cc1c60
commit 864b0fb96a
273 changed files with 20 additions and 19 deletions

View File

@ -1,7 +1,8 @@
LANG ?= en-GB
LANG ?= en
LANG := $(subst .UTF-8,,$(LANG))
LANG := $(subst _,-,$(LANG))
LANG := $(subst -, ,$(LANG))
LANG := $(subst _, ,$(LANG))
LANG := $(firstword $(LANG))
all:
./generate-html.py $(LANG)

View File

@ -30,17 +30,15 @@ Current known contributors are:
* it-IT - @LizardM4
* tr-TR - @Ardakilic
We are looking for additional contributors to cater for languages not yet in our repository. If you wish to help translate into a new language:
You should start by duplicating the `src/en` directory to the
appropriate culture. For example if you want to create a German translation you would create the folder `src/de`.
You should start by duplicating the `src/en-GB` directory to the
appropriate culture. For example if you want to create a German translation you would create the folder `src/de-DE`.
At the moment cultures are not fully supported, so you can't have `src/fr-CA` ( sorry! ), and there are no plans for this.
There are no plans to support cultures, so you can't have `src/fr-CA` ( sorry! ).
Once you've made your translation, build and preview it with, for example:
```bash
make serve LANG=de-DE
make serve LANG=de
```
And then open: http://127.0.0.1:5000 in your browser.
@ -58,4 +56,4 @@ Submit your finished translation as a pull request and I'll get it live on pinou
* Allow for slightly longer descriptions of Pin functions ( baloons? ), current width is very restrictive
* Does X board work with Y board
* What extra functions does this pin have ( mostly done with ALT functions tables, but needs descriptions )
* Tool to convert WiringPi to GPIO to BCM and back
* Tool to convert WiringPi to GPIO to BCM and back

View File

@ -328,7 +328,7 @@ Main Program Flow
'''
lang = "en-GB"
lang = "en"
default_strings = {
'made_by': '* Made by {manufacturer}',
'type_hat': '* HAT form-factor',
@ -469,7 +469,8 @@ for url in pages:
overlays = overlays_html,
resource_url = resource_url,
description = pages[url]['description'],
title = pages[url]['name']
title = pages[url]['name'],
langcode = lang
)
print('Outputting page {}'.format(url))

View File

@ -10,7 +10,7 @@ import markjaml
reload(sys)
sys.setdefaultencoding('utf8')
lang = "en-GB"
lang = "en"
if len(sys.argv) > 1:
lang = sys.argv[1]

View File

@ -53,7 +53,7 @@ def physical_to(pin, scheme='bcm'):
return pin
return None
def load(lang='en-GB'):
def load(lang='en'):
global pins, settings
if DB_FILE.endswith('.yaml'):
db = yaml.load(open('src/{}/{}'.format(lang,DB_FILE)).read())

0
resources/de-DE.png → resources/de.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 545 B

View File

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 599 B

0
resources/es-ES.png → resources/es.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 469 B

0
resources/fr-FR.png → resources/fr.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 545 B

0
resources/it-IT.png → resources/it.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 420 B

0
resources/tr-TR.png → resources/tr.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

@ -3,7 +3,7 @@ from flask import Flask, send_from_directory
import sys
app = Flask(__name__)
lang = 'en-GB'
lang = 'en'
@app.route('/')
def show_index():

Some files were not shown because too many files have changed in this diff Show More