mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 12:01:41 +00:00
Merge remote-tracking branch 'i18n/master' into master
This commit is contained in:
commit
56cb974757
.gitignore
translation
CMakeLists.txtLINGUASPOTDIRSREADME.adoc
bg
ca
cs
de
el
en
es
fi
fr
hu
it
ja
ko
lt
nl
no
pl
plot_i18n_status.pypt
ru
sk
sl
sv
tr
update-po-files.shzh_CN
zh_TW
5
.gitignore
vendored
5
.gitignore
vendored
@ -110,3 +110,8 @@ CMakeSettings.json
|
||||
# KDevelop
|
||||
.kdev4/
|
||||
*.kdev4
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
i18n_status.svg
|
||||
i18n_status.csv
|
47
translation/CMakeLists.txt
Normal file
47
translation/CMakeLists.txt
Normal file
@ -0,0 +1,47 @@
|
||||
cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR )
|
||||
|
||||
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
|
||||
message( FATAL_ERROR
|
||||
"In-source builds not allowed. Please make a new directory (called"
|
||||
" a build directory) and run CMake from there, points here."
|
||||
" You may need to remove CMakeCache.txt." )
|
||||
endif()
|
||||
|
||||
project( kicad-i18n NONE )
|
||||
|
||||
find_package( Gettext REQUIRED )
|
||||
|
||||
option( KICAD_I18N_UNIX_STRICT_PATH
|
||||
"Use standard Unix locale lookup path (default OFF)."
|
||||
OFF
|
||||
)
|
||||
|
||||
if( UNIX AND KICAD_I18N_UNIX_STRICT_PATH )
|
||||
set( KICAD_I18N_PATH ${CMAKE_INSTALL_PREFIX}/share/locale
|
||||
CACHE PATH "Location of KiCad i18n files." )
|
||||
else()
|
||||
# Default Unix inconvenient locale lookup path
|
||||
set( KICAD_I18N_PATH share/kicad/internat
|
||||
CACHE PATH "Location of KiCad i18n files." )
|
||||
endif()
|
||||
|
||||
file(STRINGS LINGUAS LANG_ARRAY REGEX "^[^#].*")
|
||||
|
||||
foreach( LANG ${LANG_ARRAY} )
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${LANG})
|
||||
|
||||
execute_process( COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/${LANG}/kicad.po
|
||||
-o ${CMAKE_BINARY_DIR}/${LANG}/kicad.mo )
|
||||
|
||||
if( UNIX AND KICAD_I18N_UNIX_STRICT_PATH )
|
||||
install( FILES ${CMAKE_BINARY_DIR}/${LANG}/kicad.mo
|
||||
DESTINATION ${KICAD_I18N_PATH}/${LANG}/LC_MESSAGES
|
||||
COMPONENT resources )
|
||||
else()
|
||||
install( FILES ${CMAKE_BINARY_DIR}/${LANG}/kicad.mo
|
||||
DESTINATION ${KICAD_I18N_PATH}/${LANG}
|
||||
COMPONENT resources )
|
||||
endif()
|
||||
endforeach()
|
||||
|
27
translation/LINGUAS
Normal file
27
translation/LINGUAS
Normal file
@ -0,0 +1,27 @@
|
||||
# please keep this list sorted alphabetically
|
||||
#
|
||||
bg
|
||||
ca
|
||||
cs
|
||||
de
|
||||
el
|
||||
en
|
||||
es
|
||||
fi
|
||||
fr
|
||||
hu
|
||||
it
|
||||
ja
|
||||
ko
|
||||
lt
|
||||
nl
|
||||
no
|
||||
pl
|
||||
pt
|
||||
ru
|
||||
sk
|
||||
sl
|
||||
sv
|
||||
tr
|
||||
zh_CN
|
||||
zh_TW
|
14
translation/POTDIRS
Normal file
14
translation/POTDIRS
Normal file
@ -0,0 +1,14 @@
|
||||
3d-viewer
|
||||
bitmap2component
|
||||
common
|
||||
cvpcb
|
||||
eeschema
|
||||
gerbview
|
||||
include
|
||||
libs
|
||||
kicad
|
||||
pagelayout_editor
|
||||
pcb_calculator
|
||||
pcbnew
|
||||
plugins
|
||||
tools
|
67
translation/README.adoc
Normal file
67
translation/README.adoc
Normal file
@ -0,0 +1,67 @@
|
||||
= KiCad GUI translations
|
||||
|
||||
This is the repository for the po files that is used for the GUI
|
||||
translations for KiCad.
|
||||
|
||||
It is cmake equipped to conform with the rest of the installation
|
||||
principles for KiCad.
|
||||
|
||||
== How to submit translations
|
||||
No general details about translating po-files will be described here,
|
||||
there are plenty of resources on the rest of the www. But a suggestion
|
||||
on how to handle updates and translations will be provided.
|
||||
|
||||
When you start translating we need to make sure there is an updated
|
||||
po-file. You can either ask someone to do push an update or do it
|
||||
yourself with the `update-po-files.sh` script. You can add your
|
||||
language code as the first argument to the script to only update that
|
||||
single language.
|
||||
|
||||
When you did update the po-file, please make a commit with the
|
||||
following text if you update the german language relative to the kicad
|
||||
master branch:
|
||||
```
|
||||
Update german to master
|
||||
|
||||
ca264f898290158f60d4c9dcd55d0428b7fa7965
|
||||
```
|
||||
|
||||
Here we included the language, branch and sha of the kicad source at
|
||||
the time of updating. Now make your translations and commit that and
|
||||
push the pull request.
|
||||
|
||||
This is not mandatory, but it makes it easer for other people to
|
||||
review your changes when we seperate the automatic update from the
|
||||
human edits.
|
||||
|
||||
|
||||
== Depends
|
||||
- Cmake
|
||||
- Gettext
|
||||
|
||||
== How to install
|
||||
```sh
|
||||
$ cd kicad-i18n
|
||||
$ BUILD_SRC=$(pwd)
|
||||
$ mkdir -p ~/tmp/kicad-i18n-build
|
||||
$ cd ~/tmp/kicad-i18n-build
|
||||
$ cmake ${BUILD_SRC}
|
||||
$ make install
|
||||
$ cd ..
|
||||
$ rm -rf ~/tmp/kicad-i18n-build
|
||||
```
|
||||
|
||||
If you want to change the default install prefix to match your KiCad
|
||||
build, you can add `cmake` option for example use:
|
||||
```
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
```
|
||||
|
||||
If you occurred some problems, use `cmake --trace -DCMAKE_VERBOSE_MAKEFILE=ON` instead `cmake` to
|
||||
make build log more verbose, when you fill issue report.
|
||||
|
||||
== Why are we not using transifex or similar service
|
||||
We would like to make it easier for people to help translate, but I
|
||||
don't really know how to make transifex work in synergy with a
|
||||
workflow where people can also update by working with the po files
|
||||
here directly.
|
43256
translation/bg/kicad.po
Normal file
43256
translation/bg/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
41269
translation/ca/kicad.po
Normal file
41269
translation/ca/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
47149
translation/cs/kicad.po
Executable file
47149
translation/cs/kicad.po
Executable file
File diff suppressed because it is too large
Load Diff
37434
translation/de/kicad.po
Normal file
37434
translation/de/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
43976
translation/el/kicad.po
Normal file
43976
translation/el/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
30156
translation/en/kicad.po
Normal file
30156
translation/en/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
51091
translation/es/kicad.po
Normal file
51091
translation/es/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
43698
translation/fi/kicad.po
Normal file
43698
translation/fi/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
40169
translation/fr/kicad.po
Normal file
40169
translation/fr/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
40186
translation/hu/kicad.po
Normal file
40186
translation/hu/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
33608
translation/it/kicad.po
Normal file
33608
translation/it/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
48299
translation/ja/kicad.po
Executable file
48299
translation/ja/kicad.po
Executable file
File diff suppressed because it is too large
Load Diff
40756
translation/ko/kicad.po
Normal file
40756
translation/ko/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
45594
translation/lt/kicad.po
Normal file
45594
translation/lt/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
44560
translation/nl/kicad.po
Normal file
44560
translation/nl/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
30987
translation/no/kicad.po
Normal file
30987
translation/no/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
35458
translation/pl/kicad.po
Normal file
35458
translation/pl/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
71
translation/plot_i18n_status.py
Executable file
71
translation/plot_i18n_status.py
Executable file
@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#####################################
|
||||
#
|
||||
# This program source code file is part of KiCad, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2016 Nick Østergaard <oe.nick at gmail dot com>
|
||||
# Copyright (C) 2016 KiCad Developers
|
||||
#
|
||||
# License GNU GPL Version 3 or any later version.
|
||||
#
|
||||
#####################################
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import csv
|
||||
import numpy as np
|
||||
import time
|
||||
|
||||
# Initialize data structure variable
|
||||
data = []
|
||||
|
||||
# Read CSV file
|
||||
with open('i18n_status.csv', 'r') as csvfile:
|
||||
spamreader = csv.reader(csvfile, delimiter=';')
|
||||
for row in spamreader:
|
||||
data.append(row)
|
||||
|
||||
# Replace empyt values with zero and convert numbers to int
|
||||
for index,value in np.ndenumerate( data ):
|
||||
if value=='':
|
||||
data[index[0]][index[1]] = 0
|
||||
try:
|
||||
data[index[0]][index[1]] = int(data[index[0]][index[1]])
|
||||
except:
|
||||
pass
|
||||
|
||||
# Sort data after mostly translated
|
||||
data[1:] = sorted(data[1:], key=lambda x: int(x[1]), reverse=True)
|
||||
|
||||
# Prepare some number for formatting the plot
|
||||
N = len(data[1:]) # number of languages
|
||||
width = 0.35 # the width of the bars
|
||||
ind = np.arange(N)*width*5 # the x locations for the groups
|
||||
|
||||
# Plot the bars
|
||||
fig, ax = plt.subplots()
|
||||
rects1 = ax.bar(ind, list(zip(*data))[1][1:], width, color='b')
|
||||
rects2 = ax.bar(ind+width, list(zip(*data))[2][1:], width, color='r')
|
||||
rects3 = ax.bar(ind+2*width, list(zip(*data))[3][1:], width, color='y')
|
||||
|
||||
# Plot ceiling
|
||||
max_nof_strings = sum(map(int, data[1][1:4]))
|
||||
plt.plot([0,max(ind)+3*width],[max_nof_strings,max_nof_strings], color='k', linewidth='2')
|
||||
ax.set_xlim([0,max(ind)+3*width])
|
||||
|
||||
# Add some text for labels, title and axes ticks
|
||||
ax.set_ylabel('Number of strings')
|
||||
ax.set_title('Translation status')
|
||||
ax.set_xticks(ind+width*1.5)
|
||||
ax.set_xticklabels(list(zip(*data))[0][1:])
|
||||
ax.yaxis.grid(True, which='both') # horizontal lines
|
||||
ax.legend((rects1[0], rects2[0], rects3[0]), ('TRANSLATED', 'FUZZY', 'UNTRANSLATED'), loc='upper center', bbox_to_anchor=(0.5, -0.05), fancybox=True, ncol=3)
|
||||
plt.figtext(0.99, 0.96, time.strftime("%d/%m %Y"), horizontalalignment='right')
|
||||
plt.subplots_adjust(left=0.07, right=0.99, top=0.95, bottom=0.12)
|
||||
|
||||
fig.set_size_inches(12, 8)
|
||||
|
||||
fig.savefig('i18n_status.svg')
|
||||
|
||||
# Show the magic to the user
|
||||
plt.show()
|
38272
translation/pt/kicad.po
Normal file
38272
translation/pt/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
35438
translation/ru/kicad.po
Normal file
35438
translation/ru/kicad.po
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user