emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Axel Kielhorn <org-mode@axelkielhorn.de>
To: Org-Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Clocktable language customization not working as expected
Date: Sat, 11 Oct 2014 20:28:42 +0200	[thread overview]
Message-ID: <23506C89-BF32-4A9F-9E2A-5DDD528079FC@axelkielhorn.de> (raw)
In-Reply-To: <874mvan50f.fsf@bzg.ath.cx>


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

      reply	other threads:[~2014-10-11 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23506C89-BF32-4A9F-9E2A-5DDD528079FC@axelkielhorn.de \
    --to=org-mode@axelkielhorn.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).