File: gmI18N.sql

package info (click to toggle)
gnumed-server 22.15-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 46,556 kB
  • sloc: sql: 1,217,005; python: 15,469; sh: 1,553; makefile: 20
file content (60 lines) | stat: -rw-r--r-- 1,639 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
-- ======================================================
-- GNUmed fixed string internationalisation (SQL gettext)
-- ======================================================

-- $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/server/sql/gmI18N.sql,v $
-- $Id: gmI18N.sql,v 1.25 2006-02-10 14:06:40 ncq Exp $
-- license: GPL v2 or later
-- author: Karsten.Hilbert@gmx.net
-- =============================================
-- Import this script into any GNUmed database you create.

-- This will allow for transparent translation of 'fixed'
-- strings in the database. Simply switching the language in
-- i18n_curr_lang will enable the user to see another language.

-- For details please see the Developer's Guide.
-- =============================================
-- force terminate + exit(3) on errors if non-interactive
\set ON_ERROR_STOP 1

-- =============================================
create schema i18n authorization "gm-dbo";

-- =============================================
create table i18n.curr_lang (
	pk serial
		primary key,
	"user" name
		default CURRENT_USER
		unique
		not null,
	lang text
		not null
);

-- =============================================
create table i18n.keys (
	pk serial
		primary key,
	orig text
		unique
		not null
);

-- =============================================
create table i18n.translations (
	pk serial
		primary key,
	lang text
		not null,
	orig text
		not null,
	trans text
		not null,
	unique (lang, orig)
);

-- =============================================
-- do simple schema revision tracking
select log_script_insertion('$RCSfile: gmI18N.sql,v $', '$Revision: 1.25 $');