blob: 5422814175076244dc28bc60f3c5127bbfe77085 [file] [log] [blame]
gobrien48275462007-11-29 21:29:17 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007 Eclipse Foundation and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Paul Colton (Aptana)- initial API and implementation
11 * Eclipse Foundation
12*******************************************************************************/
13
14require_once("cb_global.php");
15
16
gobrienad11d892007-12-19 08:33:25 +000017$string_id = $App->getHTTPParameter("string_id", "POST");
gobrien48275462007-11-29 21:29:17 +000018
19$query = "select
20 strings.string_id,
21 strings.value as string_value,
22 translations.value as translation_value,
23 max(translations.version)
24 from
25 strings
26 left join translations on
27 (strings.string_id = translations.string_id and translations.is_active != 0)
28 where
29 strings.is_active != 0
30 and
31 strings.string_id = '".addslashes($string_id)."'
32 group by translations.version
33 order by translations.version desc
34 limit 1
35 ";
36
37$res = mysql_query($query,$dbh);
38
39$line = mysql_fetch_array($res, MYSQL_ASSOC);
40
41?>
gobrien48275462007-11-29 21:29:17 +000042<form id='translation-form'>
43 <input type="hidden" name="string_id" value="<?=$line['string_id'];?>">
gobrienad11d892007-12-19 08:33:25 +000044
45 <div id="english-area" class="side-component">
46 <h4>English String</h4>
47 <div id="english-current-area">
48 <?= nl2br($line['string_value']);?>
49 </div>
50 </div>
gobrien48275462007-11-29 21:29:17 +000051
gobrienad11d892007-12-19 08:33:25 +000052 <div id="translation-textarea" class="side-component">
53 <h4>Your New Translation</h4>
54 <textarea style='display: inline; width: 400px; height: 150px;' name="translation"></textarea>
55 <br>
56 <input type="submit" value="translate">
57 </div>
58 <div id="translation-history" class="side-component">
59 <h4>History of Translations</h4>
60 <div id="translation-history">Coming soon!</div>
61 </div>
62
gobrien48275462007-11-29 21:29:17 +000063</form>