Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Use lang-ja.conf and lang-pl.conf with CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Caerbannog committed Jul 21, 2015
1 parent eeb5fc9 commit 6c5f5c7
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeModules/AsciidocHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endmacro()

# Add an asciidoc to HTML conversion target
macro( add_adoc_html_target TARGET INFILE OUTFILE LANGUAGE )
add_custom_target( ${TARGET} ALL ${ASCIIDOC_COMMAND} ${ASCIIDOC_OPTIONS} -a lang=${LANGUAGE} -o ${OUTFILE} ${INFILE} )
add_custom_target( ${TARGET} ALL ${ASCIIDOC_COMMAND} ${ASCIIDOC_OPTIONS} ${LANGUAGE_OPTIONS} -o ${OUTFILE} ${INFILE} )
endmacro()

# Pass an option to asciidoc
Expand Down
6 changes: 6 additions & 0 deletions CMakeModules/KiCadDocumentation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ macro( KiCadDocumentation DOCNAME )

string( SUBSTRING "${LANGUAGE}" 0 2 LANGUAGE )

if(EXISTS "${CMAKE_SOURCE_DIR}/CMakeSupport/lang-${LANGUAGE}.conf")
set( LANGUAGE_OPTIONS "-f${CMAKE_SOURCE_DIR}/CMakeSupport/lang-${LANGUAGE}.conf" )
else()
set( LANGUAGE_OPTIONS "-a lang=${LANGUAGE}" ) # Fall back to the default config file for this language.
endif()

if( "${LANGUAGE}" MATCHES "en" )
# No need to translate, so just make a renamed copy of the source instead such
# that we have the same source target as every other language
Expand Down
61 changes: 61 additions & 0 deletions CMakeSupport/lang-ja.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# AsciiDoc Japanese language configuration file.
# Originally written by 渡邊裕貴 (WATANABE Yuki)
#

[attributes]
# Left and right single and double quote characters.
lsquo=「
rsquo=」
ldquo=『
rdquo=』

# Captions, used by (X)HTML backends.
# Captions on RHS are displayed in outputs.
ifdef::basebackend-html[]

caution-caption=注意
important-caption=重要
note-caption=注
tip-caption=補足
warning-caption=警告
figure-caption=図
table-caption=表
example-caption=例
toc-title=目次
appendix-caption=付録
# Man page NAME section title.
manname-title=名前

[footer-text]
バージョン {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
{docdate} {doctime} 更新

endif::basebackend-html[]


[specialsections]
# DocBook special sections.
# The regular expression on LHS is matched against source titles.
ifdef::basebackend-docbook[]

ifdef::doctype-article[]
^概要$=abstract
endif::doctype-article[]

ifdef::doctype-book[]
^奥付け?$=colophon
^献辞$=dedication
^(前書き?|まえがき)$=preface
endif::doctype-book[]

^索引$=index
^(参考|引用)(書目|文献)$=bibliography
^用語集$=glossary
^付録 [A-Z][:.](?P<title>.*)$=appendix

endif::basebackend-docbook[]

ifdef::doctype-manpage[]
^書式$=synopsis
endif::doctype-manpage[]
55 changes: 55 additions & 0 deletions CMakeSupport/lang-pl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# AsciiDoc Polish language configuration file.
# (C) 2015 Kerusey Karyu <[email protected]>
# License: GNU Free Documentation License, ver. 1.3 or later version, see http://fsf.org/

[attributes]
# Captions, used by (X)HTML backends.
# Captions on RHS are displayed in outputs.
ifdef::basebackend-html[]

caution-caption=Uwaga
important-caption=Ważne
note-caption=Zapamiętaj
tip-caption=Wskazówka
warning-caption=Ostrzeżenie
figure-caption=Rysunek
table-caption=Tabela
example-caption=Przykład
toc-title=Spis Treści
appendix-caption=Dodatek
# Man page NAME section title.
manname-title=NAME

[footer-text]
Wersja {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
Ostatnio zmodyfikowany {docdate} {doctime}

endif::basebackend-html[]


[specialsections]
# DocBook special sections.
# The regular expression on LHS is matched against source titles.
ifdef::basebackend-docbook[]

ifdef::doctype-article[]
^Streszczenie$=abstract
endif::doctype-article[]

ifdef::doctype-book[]
^Kolofon$=colophon
^Dedykacja$=dedication
^Przedmowa$=preface
endif::doctype-book[]

^Indeks$=index
^(Bibliografia|Źródła)$=bibliography
^Słowniczek$=glossary
^Dodatek [A-Z][:.](?P<title>.*)$=appendix

endif::basebackend-docbook[]

ifdef::doctype-manpage[]
(?i)^KONSPEKT$=synopsis
endif::doctype-manpage[]

0 comments on commit 6c5f5c7

Please sign in to comment.