* Clocktable language customization not working as expected
@ 2014-10-04 7:34 Axel Kielhorn
2014-10-06 21:15 ` Andrea Rossetti
0 siblings, 1 reply; 5+ messages in thread
From: Axel Kielhorn @ 2014-10-04 7:34 UTC (permalink / raw
To: Org-Mode Mailing List
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Moin!
I'm using org to keep track of my work time.
Since I work at a german company I would like to generate a clock table report in german.
(It is not supported yet, but that will be a one line patch.)
To test the customization I switched to french, which is supported.
First try:
Setting the document language to fr, nothing changed
Second try:
Adding ~:land fr~ to the clock table options, surprising result: no language at all.
Third try:
Setting the language via ~Org Clocktable Defaults~: this actually works.
Result:
Switching languages actually works, but the interface is strange.
I'm using org-mode from ELPA and Emacs 24.3 (Same results with 24.3.91)
Is there anything broken in my setup or is this a bug?
Axel
[-- Attachment #2: clocktable ECM.org --]
[-- Type: application/octet-stream, Size: 1932 bytes --]
#+TITLE: Clocktable ECM
#+AUTHOR: Axel Kielhorn
#+LANGUAGE: fr
* Gesamtarbeitszeit :noexport:
** Projekt 12301
*** time 1
:CLOCK:
CLOCK: [2014-10-03 Fri 14:09]--[2014-10-03 Fri 14:11] => 0:02
:END:
*** time 2
:CLOCK:
CLOCK: [2014-10-03 Fri 15:03]--[2014-10-03 Fri 15:04] => 0:01
:END:
** Projekt 12302
*** time 3
:CLOCK:
CLOCK: [2014-10-03 Fri 14:11]--[2014-10-03 Fri 14:13] => 0:02
:END:
*** time 4
:CLOCK:
CLOCK: [2014-10-03 Fri 14:13]--[2014-10-03 Fri 14:39] => 0:26
:END:
* Zusammenfassung
** Gesamtarbeitszeit
Document language: no effect
#+BEGIN: clocktable :maxlevel 2 :scope file
#+CAPTION: Clock summary at [2014-10-04 Sat 09:09]
| Headline | Time | |
|---------------------+--------+------|
| *Total time* | *0:31* | |
|---------------------+--------+------|
| Gesamtarbeitszeit | 0:31 | |
| \emsp Projekt 12301 | | 0:03 |
| \emsp Projekt 12302 | | 0:28 |
#+END:
Clocktable language: not working
#+BEGIN: clocktable :maxlevel 2 :scope file :lang fr
#+CAPTION: [2014-10-04 Sat 09:09]
| | | |
|---------------------+--------+------|
| *nil* | *0:31* | |
|---------------------+--------+------|
| Gesamtarbeitszeit | 0:31 | |
| \emsp Projekt 12301 | | 0:03 |
| \emsp Projekt 12302 | | 0:28 |
#+END:
Customize Org Clocktable Defaults: working
#+BEGIN: clocktable :maxlevel 2 :scope file
#+CAPTION: Horodatage sommaire à [2014-10-04 Sat 09:12]
| En-tête | Durée | |
|---------------------+--------+------|
| *Durée totale* | *0:31* | |
|---------------------+--------+------|
| Gesamtarbeitszeit | 0:31 | |
| \emsp Projekt 12301 | | 0:03 |
| \emsp Projekt 12302 | | 0:28 |
#+END:
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Clocktable language customization not working as expected
2014-10-04 7:34 Clocktable language customization not working as expected Axel Kielhorn
@ 2014-10-06 21:15 ` Andrea Rossetti
2014-10-07 4:38 ` Axel Kielhorn
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Rossetti @ 2014-10-06 21:15 UTC (permalink / raw
To: Axel Kielhorn; +Cc: Org-Mode Mailing List
Axel Kielhorn <org-mode@axelkielhorn.de> writes:
>
> Clocktable language: not working
>
> #+BEGIN: clocktable :maxlevel 2 :scope file :lang fr
> #+CAPTION: [2014-10-04 Sat 09:09]
> | | | |
> |---------------------+--------+------|
> | *nil* | *0:31* | |
> |---------------------+--------+------|
> | Gesamtarbeitszeit | 0:31 | |
> | \emsp Projekt 12301 | | 0:03 |
> | \emsp Projekt 12302 | | 0:28 |
> #+END:
>
Not an exhaustive answer, but hope it helps: it works
for me if I change :lang fr into :lang "fr". Same for you?
Kindest regards, Andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Clocktable language customization not working as expected
2014-10-06 21:15 ` Andrea Rossetti
@ 2014-10-07 4:38 ` Axel Kielhorn
2014-10-11 12:51 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Axel Kielhorn @ 2014-10-07 4:38 UTC (permalink / raw
To: Org-Mode Mailing List
Am 06.10.2014 um 23:15 schrieb Andrea Rossetti <andrea.rossetti@gmail.com>:
> Axel Kielhorn <org-mode@axelkielhorn.de> writes:
>>
>> Clocktable language: not working
>>
>> #+BEGIN: clocktable :maxlevel 2 :scope file :lang fr
>> #+CAPTION: [2014-10-04 Sat 09:09]
>> | | | |
>> |---------------------+--------+------|
>> | *nil* | *0:31* | |
>> |---------------------+--------+------|
>> | Gesamtarbeitszeit | 0:31 | |
>> | \emsp Projekt 12301 | | 0:03 |
>> | \emsp Projekt 12302 | | 0:28 |
>> #+END:
>>
>
> Not an exhaustive answer, but hope it helps: it works
> for me if I change :lang fr into :lang "fr". Same for you?
Yes, this works, thanks for the suggestion.
It still does not work for:
#+LANGUAGE: "fr"
and i discovered some untranslated english words in the caption when generating a clock table for a week/month/quater,
But getting:
#+BEGIN: clocktable :maxlevel 2 :scope file :lang "de"
#+CAPTION: Erstellt am [2014-10-07 Tue 06:32]
| Tätigkeit | Zeit | |
is already an improvement.
Axel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Clocktable language customization not working as expected
2014-10-07 4:38 ` Axel Kielhorn
@ 2014-10-11 12:51 ` Bastien
2014-10-11 18:28 ` Axel Kielhorn
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2014-10-11 12:51 UTC (permalink / raw
To: Axel Kielhorn; +Cc: Org-Mode Mailing List
Hi Axel,
Axel Kielhorn <org-mode@axelkielhorn.de> writes:
> It still does not work for:
>
> #+LANGUAGE: "fr"
Does it work for
#+LANGUAGE: fr
?
> and i discovered some untranslated english words in the caption when
> generating a clock table for a week/month/quater,
Please report missing translations and someone will fix it.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Clocktable language customization not working as expected
2014-10-11 12:51 ` Bastien
@ 2014-10-11 18:28 ` Axel Kielhorn
0 siblings, 0 replies; 5+ messages in thread
From: Axel Kielhorn @ 2014-10-11 18:28 UTC (permalink / raw
To: Org-Mode Mailing List
Am 11.10.2014 um 14:51 schrieb Bastien <bzg@gnu.org>:
> Hi Axel,
>
> Axel Kielhorn <org-mode@axelkielhorn.de> writes:
>
>> It still does not work for:
>>
>> #+LANGUAGE: "fr"
>
> Does it work for
>
> #+LANGUAGE: fr
No. That was my first try. It has no effect.
>> and i discovered some untranslated english words in the caption when
>> generating a clock table for a week/month/quater,
>
> Please report missing translations and someone will fix it.
>
> Thanks!
Here is what I'm using now in custom.el:
'(org-clock-clocktable-language-setup
(quote
(("en" "File" "L" "Timestamp" "Headline" "Time" "ALL" "Total time" "File time" "Clock summary at")
("es" "Archivo" "N" "Fecha y hora" "Tarea" "Tiempo" "TODO" "Tiempo total" "Tiempo archivo" "Clock summary at")
("fr" "Fichier" "N" "Horodatage" "En-tête" "Durée" "TOUT" "Durée totale" "Durée fichier" "Horodatage sommaire à")
("nl" "Bestand" "N" "Tijdstip" "Hoofding" "Duur" "ALLES" "Totale duur" "Bestandstijd" "Clock summary at")
("de" "Datei" "L" "Timestamp" "Tätigkeit" "Zeit" "" "Gesamtzeit" "Datei Zeit" "Erstellt am"))))
I haven't encountered "Timestamp" so far and didn't translate it.
Getting these translations into org would be nice, but may require some discussion among the german users first.
There are some untranslated strings in
(defun org-clock-special-range (key &optional time as-strings wstart mstart)
…
(cond
((memq key '(day today))
(setq txt (format-time-string "%A, %B %d, %Y" ts)))
((memq key '(week thisweek))
(setq txt (format-time-string "week %G-W%V" ts)))
((memq key '(month thismonth))
(setq txt (format-time-string "%B %Y" ts)))
((memq key '(year thisyear))
(setq txt (format-time-string "the year %Y" ts)))
((memq key '(quarter thisq))
(setq txt (concat (org-count-quarter shiftedq) " quarter of " (number-to-string shiftedy)))))
(if as-strings
(list (format-time-string fm ts) (format-time-string fm te) txt)
(list ts te txt))))
and
(defun org-clocktable-write-default (ipos tables params)
…
;; Insert the text *before* the actual table
(insert-before-markers
(or header
;; Format the standard header
(concat
"#+CAPTION: "
(nth 9 lwords) " ["
(substring
(format-time-string (cdr org-time-stamp-formats))
1 -1)
"]"
(if block (concat ", for " range-text ".") "")
"\n")))
Right now I'm doing weekly reports and adjust the caption.
Axel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-11 18:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-04 7:34 Clocktable language customization not working as expected Axel Kielhorn
2014-10-06 21:15 ` Andrea Rossetti
2014-10-07 4:38 ` Axel Kielhorn
2014-10-11 12:51 ` Bastien
2014-10-11 18:28 ` Axel Kielhorn
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.