[Thunar-dev] Create File

Jannis Pohlmann info at sten-net.de
Tue Jan 31 11:21:28 CET 2006


Benedikt Meurer schrieb:
> Jannis Pohlmann wrote:
> 
>>Understandable. Another configure option for this would be stupid, IMHO.
>>This is a thing which should not need to be adjusted by the user. And
>>hidden options are ugly as well. The only thing I can imagine is an
>>option "[ ] Use Nautilus templates" which adds ~/Templates to the
>>include/search path.
>>
>>If we'd go for 2) the ~/Templates folder still would be scanned and
>>therewith the reasons for implementing 2) would still exist and cause
>>problems. It's a difficult decision.
>>
>>I vote for using
>>
>>  1. $XDG_DATA_HOME/Thunar/Templates
>>  2. /usr/share/Thunar/ (or something like that; additionally, for
>>     global templates)
> 
> 
> Ok, $XDG_DATA_DIRS/Templates then, and merge ~/Templates if present, see
> http://bugzilla.xfce.org/show_bug.cgi?id=1404 (add further comments,
> suggestions to the bugreport please).
> 
> 
>>and dropping Nautilus compatibility here. I'd even offer myself for
>>creating a buch default templates for the Thunar distribution. Yet, I
>>wonder if the global (default) ones can be created by the auto* tools
>>(or a self-written shell or python script) during installation, based on
>>properly translated names.
> 
> 
> Well, i18n is a non-trivial problem here, since it's not only the file
> name to translate, but also the file content. For example a HTML
> template would look like this in english:
> 
> <html>
> <head><title>HTML Template</title></head>
> <body><h1>HTML Template</h1></head>
> </html>
> 
> but the german version would be:
> 
> <html>
> <head><title>HTML Vorlage</title></head>
> <body><h1>HTML Vorlage</h1></head>
> </html>
> 
> So, what we would need is a way to have different templates per
> language. Maybe organized ala CDE below
> $datadir/Thunar/Templates/<lang>, dunno.

Hmmm, that's true, of course. Perhaps don't fill the templates with
language specific content and just name them differently dependent on
the language? Just like this:

"Python-Skript.py" (de), "Python Script.py" (en), ...:

	-- Content --
	#!/usr/bin/env python
	-- EOF --

"HMTL-Dokument" (de), "HTML Document" (en), ...:

	-- Content --
	<!DOCTYPE ...>
	<html>
	  <head>
	    <title></title>
	    ...
	  </head>
	  <body>
	  </body>
	</html>
	-- EOF --

Okay, there probably are templates where translated content makes sense
or even is necessary. Just thoughts.

- Jannis



More information about the Thunar-dev mailing list