Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6c605023
Kaydet (Commit)
6c605023
authored
Eki 29, 2011
tarafından
Andras Timar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove localization tool of obsoleted layout code
üst
ca54c036
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
368 deletions
+0
-368
README
l10ntools/layout/README
+0
-28
layoutparse.cxx
l10ntools/layout/layoutparse.cxx
+0
-142
layoutparse.hxx
l10ntools/layout/layoutparse.hxx
+0
-54
loc.sdf
l10ntools/layout/loc.sdf
+0
-24
makefile.mk
l10ntools/layout/makefile.mk
+0
-76
tralay.cxx
l10ntools/layout/tralay.cxx
+0
-0
zoom.xml
l10ntools/layout/zoom.xml
+0
-40
build.lst
l10ntools/prj/build.lst
+0
-1
d.lst
l10ntools/prj/d.lst
+0
-3
No files found.
l10ntools/layout/README
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
Tralay - Extract and translate strings in Layout xml files.
Translatable strings in layout xml files are attributes that have name
which starts with an underscore, eg
_title="Set Zoom"
_label="Whole Page"
Here is how it works
* Extract: generate out.sdf
../unxlngx6.pro/bin/tralay -l en-US zoom.xml > out.sdf
* Translate: do:
cat out.sdf > trans.sdf
sed 's/en-US\t/de\tde:/' out.sdf >> trans.sdf
* Merge: translate
../unxlngx6.pro/bin/tralay -m trans.sdf -l de zoom.xml > zoom-DE.xml
Running
dmake test
does something similar.
\ No newline at end of file
l10ntools/layout/layoutparse.cxx
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "layoutparse.hxx"
#define STRING( str ) String( str, RTL_TEXTENCODING_UTF8 )
#define BSTRING( str ) ByteString( str, RTL_TEXTENCODING_UTF8 )
LayoutXMLFile
::
LayoutXMLFile
(
bool
mergeMode
)
:
XMLFile
()
,
mMergeMode
(
mergeMode
)
{
}
void
LayoutXMLFile
::
SearchL10NElements
(
XMLParentNode
*
pCur
,
int
)
{
if
(
!
pCur
)
pCur
=
this
;
/* Recurse int children, SearchL10NElements does not do that for us. */
if
(
XMLChildNodeList
*
lst
=
pCur
->
GetChildList
()
)
for
(
size_t
i
=
0
;
i
<
lst
->
size
();
i
++
)
if
(
(
*
lst
)[
i
]
->
GetNodeType
()
==
XML_NODE_TYPE_ELEMENT
)
HandleElement
(
(
XMLElement
*
)(
*
lst
)[
i
]
);
else
if
(
(
*
lst
)[
i
]
->
GetNodeType
()
==
XML_NODE_TYPE_COMMENT
)
{
XMLChildNodeList
::
iterator
it
=
lst
->
begin
();
::
std
::
advance
(
it
,
i
);
lst
->
erase
(
it
);
i
--
;
}
}
std
::
vector
<
XMLAttribute
*>
interestingAttributes
(
XMLAttributeList
*
lst
)
{
std
::
vector
<
XMLAttribute
*>
interesting
;
if
(
lst
)
for
(
size_t
i
=
0
;
i
<
lst
->
size
();
i
++
)
if
(
(
*
lst
)[
i
]
->
Equals
(
STRING
(
"id"
)
)
)
interesting
.
insert
(
interesting
.
begin
(),
(
*
lst
)[
i
]
);
else
if
(
!
BSTRING
(
*
(
*
lst
)[
i
]).
CompareTo
(
"_"
,
1
)
)
interesting
.
push_back
(
(
*
lst
)[
i
]
);
return
interesting
;
}
void
LayoutXMLFile
::
HandleElement
(
XMLElement
*
element
)
{
std
::
vector
<
XMLAttribute
*>
interesting
=
interestingAttributes
(
element
->
GetAttributeList
()
);
if
(
!
interesting
.
empty
()
)
{
std
::
vector
<
XMLAttribute
*>::
iterator
i
=
interesting
.
begin
();
ByteString
id
=
BSTRING
(
(
*
i
++
)
->
GetValue
()
);
if
(
mMergeMode
)
InsertL10NElement
(
id
,
element
);
else
for
(
;
i
!=
interesting
.
end
();
++
i
)
{
ByteString
attributeId
=
id
;
ByteString
value
=
BSTRING
(
(
*
i
)
->
GetValue
()
);
XMLElement
*
e
=
new
XMLElement
(
*
element
);
e
->
RemoveAndDeleteAllChilds
();
/* Copy translatable text to CONTENT. */
//new XMLData( STRING( ( *i )->GetValue() ), e, true );
new
XMLData
(
STRING
(
value
),
e
,
true
);
attributeId
+=
BSTRING
(
**
i
);
InsertL10NElement
(
attributeId
,
e
);
}
}
SearchL10NElements
(
(
XMLParentNode
*
)
element
);
}
void
LayoutXMLFile
::
InsertL10NElement
(
ByteString
const
&
id
,
XMLElement
*
element
)
{
ByteString
const
language
=
"en-US"
;
LangHashMap
*
languageMap
=
0
;
XMLHashMap
::
iterator
pos
=
XMLStrings
->
find
(
id
);
if
(
pos
!=
XMLStrings
->
end
()
)
{
languageMap
=
pos
->
second
;
fprintf
(
stderr
,
"error:%s:duplicate translation found, id=%s
\n
"
,
id
.
GetBuffer
(),
BSTRING
(
sFileName
).
GetBuffer
()
);
exit
(
1
);
}
else
{
languageMap
=
new
LangHashMap
();
XMLStrings
->
insert
(
XMLHashMap
::
value_type
(
id
,
languageMap
)
);
order
.
push_back
(
id
);
}
(
*
languageMap
)[
language
]
=
element
;
}
sal_Bool
LayoutXMLFile
::
Write
(
ByteString
&
aFilename
)
{
if
(
aFilename
.
Len
()
)
{
ofstream
aFStream
(
aFilename
.
GetBuffer
()
,
ios
::
out
|
ios
::
trunc
);
if
(
!
aFStream
)
fprintf
(
stderr
,
"ERROR: cannot open file:%s
\n
"
,
aFilename
.
GetBuffer
()
);
else
{
XMLFile
::
Write
(
aFStream
);
aFStream
.
close
();
return
true
;
}
}
return
false
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
l10ntools/layout/layoutparse.hxx
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef LAYOUTPARSE_HXX
#define LAYOUTPARSE_HXX
#include "xmlparse.hxx"
class
LayoutXMLFile
:
public
XMLFile
{
bool
mMergeMode
;
public
:
LayoutXMLFile
(
bool
mergeMode
);
void
SearchL10NElements
(
XMLParentNode
*
pCur
,
int
pos
=
0
);
sal_Bool
Write
(
ByteString
&
aFilename
);
void
HandleElement
(
XMLElement
*
element
);
void
InsertL10NElement
(
ByteString
const
&
id
,
XMLElement
*
element
);
using
XMLFile
::
InsertL10NElement
;
using
XMLFile
::
Write
;
};
std
::
vector
<
XMLAttribute
*>
interestingAttributes
(
XMLAttributeList
*
lst
);
#endif
/* LAYOUTPARSE_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
l10ntools/layout/loc.sdf
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
transex3 layout\workben\zoom-1.xml 0 help FL_ZOOM 0 en-US Zoom factor 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_WHOLE_PAGE 0 en-US Whole Page 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_PAGE_WIDTH 0 en-US Page Width 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_OPTIMAL 0 en-US Optimal 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_200 0 en-US 200 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_150 0 en-US 15~0 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_100 0 en-US 100 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_75 0 en-US 75 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_50 0 en-US 50 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_USER 0 en-US Variable 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help FL_ZOOM 0 de deZoom factor 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_WHOLE_PAGE 0 de deWhole Page 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_PAGE_WIDTH 0 de dePage Width 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_OPTIMAL 0 de deOptimal 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_200 0 de de200 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_150 0 de de15~0 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_100 0 de de100 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_75 0 de de75 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_50 0 de de50 % 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_USER 0 de deVariable 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help FL_ZOOM 0 en-US Zoom factor 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_WHOLE_PAGE 0 en-US Whole Page 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help FL_ZOOM 0 de de3:Zoom factor 20080204 13:51:01
transex3 layout\workben\zoom-1.xml 0 help BTN_WHOLE_PAGE 0 de de3:Whole Page 20080204 13:51:01
l10ntools/layout/makefile.mk
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ
=
..
INCPRE
=
$(MISC)
PRJNAME
=
l10ntools
TARGET
=
tralay
TARGETTYPE
=
CUI
LIBTARGET
=
no
# --- Settings -----------------------------------------------------
ENABLE_EXCEPTIONS
=
TRUE
.INCLUDE
:
settings.mk
.IF
"$(SYSTEM_EXPAT)"
==
"YES"
CFLAGS
+=
-DSYSTEM_EXPAT
.ENDIF
# --- Files --------------------------------------------------------
APP1TARGET
=
$(TARGET)
OBJFILES
=
\
$(OBJ)
/export2.obj
\
$(OBJ)
/helpmerge.obj
\
$(OBJ)
/layoutparse.obj
\
$(OBJ)
/merge.obj
\
$(OBJ)
/tralay.obj
\
$(OBJ)
/xmlparse.obj
APP1OBJS
=
$(OBJFILES)
APP1RPATH
=
NONE
APP1STDLIBS
=
\
$(COMPHELPERLIB)
\
$(TOOLSLIB)
\
$(EXPATASCII3RDLIB)
\
$(CPPULIB)
\
$(SALLIB)
# --- Targets ------------------------------------------------------
.INCLUDE
:
target.mk
test .PHONY
:
../$(INPATH)/bin/tralay
-l
en-US
-o
out.sdf
zoom.xml
cat
out.sdf
>
trans.sdf
sed 's/en-US\t/de\tde
:
/' out.sdf >> trans.sdf
../$(INPATH)/bin/tralay
-m
trans.sdf
-l
de
-o
zoom-DE.xml
zoom.xml
l10ntools/layout/tralay.cxx
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
This diff is collapsed.
Click to expand it.
l10ntools/layout/zoom.xml
deleted
100644 → 0
Dosyayı görüntüle @
ca54c036
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a template. i18n translation is not performed in-place;
i18n translated xml files are generated from this template by
transex3/layout/tralay. !-->
<modaldialog
xmlns=
"http://openoffice.org/2007/layout"
xmlns:cnt=
"http://openoffice.org/2007/layout/container"
id=
"dialog"
_title=
"Set Zoom"
_label=
"boe"
optimumsize=
"true"
help-id=
"SID_ATTR_ZOOM"
has_border=
"true"
sizeable=
"true"
moveable=
"true"
>
<vbox
spacing=
"5"
border=
"5"
>
<fixedline
id=
"FL_ZOOM"
_text=
"Zoom factor"
_tooltip=
"bah"
cnt:expand=
"true"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_WHOLE_PAGE"
_label=
"Whole Page"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_PAGE_WIDTH"
_label=
"Page Width"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_OPTIMAL"
_label=
"Optimal"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_200"
_label=
"200 %"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_150"
_label=
"15~0 %"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_100"
_label=
"100 %"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_75"
_label=
"75 %"
/>
<radiobutton
radiogroup=
"zoom"
id=
"BTN_50"
_label=
"50 %"
/>
<hbox
cnt:expand=
"false"
cnt:fill=
"true"
>
<align
cnt:expand=
"false"
cnt:fill=
"true"
>
<radiobutton
cnt:v-align=
"0.5"
cnt:v-fill=
"0"
radiogroup=
"zoom"
id=
"BTN_USER"
_label=
"Variable"
/>
</align>
<flow
cnt:padding=
"10"
cnt:expand=
"false"
/>
<metricfield
id=
"ED_USER"
value-step=
"1"
repeat=
"true"
has_border=
"true"
spin=
"true"
text=
"100%"
unit=
"13"
custom-unit-text=
"%"
right=
"true"
cnt:expand=
"false"
/>
</hbox>
<fixedline
cnt:padding=
"1"
id=
"FL_BOTTOM"
/>
<dialogbuttonhbox
border=
"5"
spacing=
"5"
>
<flow/>
<okbutton
id=
"BTN_ZOOM_OK"
/>
<cancelbutton
id=
"BTN_ZOOM_CANCEL"
/>
<helpbutton
id=
"BTN_ZOOM_HELP"
/>
</dialogbuttonhbox>
</vbox>
</modaldialog>
l10ntools/prj/build.lst
Dosyayı görüntüle @
6c605023
...
@@ -2,7 +2,6 @@ tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
...
@@ -2,7 +2,6 @@ tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
tr l10ntools\inc nmake - all tr_inc NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
tr l10ntools\layout nmake - all rt_layout tr_src tr_inc NULL
tr l10ntools\source\help nmake - all tr_bla_help NULL
tr l10ntools\source\help nmake - all tr_bla_help NULL
tr l10ntools\source\filter\utils nmake - all tr_bla_utils NULL
tr l10ntools\source\filter\utils nmake - all tr_bla_utils NULL
tr l10ntools\source\filter\merge nmake - all tr_bla_merge tr_bla_utils NULL
tr l10ntools\source\filter\merge nmake - all tr_bla_merge tr_bla_utils NULL
l10ntools/prj/d.lst
Dosyayı görüntüle @
6c605023
...
@@ -24,12 +24,9 @@ mkdir: %_DEST%\bin\help\com\sun\star\help
...
@@ -24,12 +24,9 @@ mkdir: %_DEST%\bin\help\com\sun\star\help
..\%__SRC%\bin\ulfex %_DEST%\bin\ulfex
..\%__SRC%\bin\ulfex %_DEST%\bin\ulfex
..\%__SRC%\bin\txtconv.exe %_DEST%\bin\txtconv.exe
..\%__SRC%\bin\txtconv.exe %_DEST%\bin\txtconv.exe
..\%__SRC%\bin\txtconv %_DEST%\bin\txtconv
..\%__SRC%\bin\txtconv %_DEST%\bin\txtconv
..\%__SRC%\bin\tralay.exe %_DEST%\bin\tralay.exe
..\%__SRC%\bin\tralay %_DEST%\bin\tralay
..\%__SRC%\bin\ulfconv %_DEST%\bin\ulfconv
..\%__SRC%\bin\ulfconv %_DEST%\bin\ulfconv
..\%__SRC%\class\FCFGMerge.jar %_DEST%\bin\FCFGMerge.jar
..\%__SRC%\class\FCFGMerge.jar %_DEST%\bin\FCFGMerge.jar
..\%__SRC%\class\HelpIndexerTool.jar %_DEST%\bin\HelpIndexerTool.jar
..\%__SRC%\class\HelpIndexerTool.jar %_DEST%\bin\HelpIndexerTool.jar
..\%__SRC%\class\jpropex\jpropex.jar %_DEST%\bin\jpropex.jar
..\%__SRC%\bin\HelpLinker %_DEST%\bin\HelpLinker
..\%__SRC%\bin\HelpLinker %_DEST%\bin\HelpLinker
..\%__SRC%\bin\HelpCompiler %_DEST%\bin\HelpCompiler
..\%__SRC%\bin\HelpCompiler %_DEST%\bin\HelpCompiler
..\%__SRC%\bin\HelpCompiler.exe %_DEST%\bin\HelpCompiler.exe
..\%__SRC%\bin\HelpCompiler.exe %_DEST%\bin\HelpCompiler.exe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment