Commits

Anonymous committed 30acf95

remove not useful plugin and dummy, better use other working plugin as template

Comments (0)

Files changed (14)

part/plugins/CMakeLists.txt

 
 add_subdirectory( hlselection )
 add_subdirectory( insertfile )
-add_subdirectory( kdatatool )
 add_subdirectory( exporter )
 add_subdirectory( autobrace )
 add_subdirectory( kte_iconinserter )
-
-# This plugin is for howto-write-a-plugin purposes. It is not meant to be
-# installed. If you want to do so, just uncomment the add_subdirectory line.
-#
-# add_subdirectory( timedate )

part/plugins/kdatatool/CMakeLists.txt

-
-########### next target ###############
-
-set(ktexteditor_kdatatool_PART_SRCS kate_kdatatool.cpp )
-
-
-kde4_add_plugin(ktexteditor_kdatatool ${ktexteditor_kdatatool_PART_SRCS})
-
-target_link_libraries(ktexteditor_kdatatool ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ktexteditor kio kdeui )
-
-install(TARGETS ktexteditor_kdatatool  DESTINATION ${PLUGIN_INSTALL_DIR} )
-
-
-########### install files ###############
-
-install( FILES ktexteditor_kdatatoolui.rc  DESTINATION  ${DATA_INSTALL_DIR}/ktexteditor_kdatatool )
-install( FILES ktexteditor_kdatatool.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
-
-
-
-

part/plugins/kdatatool/kate_kdatatool.cpp

-/* This file is part of the KDE libraries
-   Copyright (C) 2002 Joseph Wenninger <jowenn@jowenn.at> and Daniel Naber <daniel.naber@t-online.de>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License version 2 as published by the Free Software Foundation.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-//BEGIN includes
-#include "kate_kdatatool.h"
-#include "kate_kdatatool.moc"
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-#include <kaction.h>
-#include <kactioncollection.h>
-#include <ktexteditor/view.h>
-#include <kdebug.h>
-#include <kdatatool.h>
-#include <ktexteditor/document.h>
-#include <kmenu.h>
-#include <kmessagebox.h>
-#include <kaboutdata.h>
-#include <kactionmenu.h>
-#include <klocale.h>
-//END includes
-
-K_PLUGIN_FACTORY( KDataToolPluginFactory, registerPlugin<KTextEditor::KDataToolPlugin>(); )
-K_EXPORT_PLUGIN( KDataToolPluginFactory( KAboutData("ktexteditor_kdatatool", "ktexteditor_plugins", ki18n("DataTool"), "0.1", ki18n("Data tool"), KAboutData::License_LGPL_V2) ) )
-
-namespace KTextEditor {
-
-KDataToolPlugin::KDataToolPlugin( QObject *parent, const QVariantList& )
-	: KTextEditor::Plugin ( parent )
-{
-}
-
-
-KDataToolPlugin::~KDataToolPlugin ()
-{
-}
-
-void KDataToolPlugin::addView(KTextEditor::View *view)
-{
-	KDataToolPluginView *nview = new KDataToolPluginView (view);
-	m_views.append (nview);
-}
-
-void KDataToolPlugin::removeView(KTextEditor::View *view)
-{
-	foreach (KDataToolPluginView *pluginView, m_views) {
-		if (pluginView->view() == view) {
-			m_views.removeAll(pluginView);
-			delete pluginView;
-			break;
-		}
-	}
-}
-
-KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view )
-	: QObject(view),KXMLGUIClient(view), m_view(view), m_menu(0),m_notAvailable(0)
-{
-	setComponentData( KDataToolPluginFactory::componentData() );
-	setXMLFile("ktexteditor_kdatatoolui.rc");
-
-	m_menu = new KActionMenu(i18n("Data Tools"), this);
-        actionCollection()->addAction("popup_dataTool", m_menu);
-	connect(m_menu->menu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
-}
-
-KDataToolPluginView::~KDataToolPluginView()
-{
-        m_view->removeChildClient (this);
-	delete m_menu;
-}
-
-View* KDataToolPluginView::view() const
-{
-	return m_view;
-}
-
-void KDataToolPluginView::aboutToShow()
-{
-	kDebug( 13040 )<<"KTextEditor::KDataToolPluginView::aboutToShow";
-	QString word;
-	m_singleWord = false;
-	m_wordUnderCursor.clear();
-
-	// unplug old actions, if any:
-	foreach (QAction *ac, m_actionList) {
-		m_menu->removeAction(ac);
-	}
-	if (m_notAvailable) {
-		m_menu->removeAction(m_notAvailable);
-		delete m_notAvailable;
-		m_notAvailable=0;
-	}
-	if ( m_view->selection() )
-	{
-		word = m_view->selectionText();
-		if ( word.indexOf(' ') == -1 && word.indexOf('\t') == -1 && word.indexOf('\n') == -1 )
-			m_singleWord = true;
-		else
-			m_singleWord = false;
-	} else {
-		// No selection -> use word under cursor
-		KTextEditor::View *v = (KTextEditor::View*)m_view;
-		int line, col;
-		line = v->cursorPosition().line();
-		col = v->cursorPosition().column();
-		QString tmp_line = v->document()->line(line);
-		m_wordUnderCursor = "";
-		// find begin of word:
-		m_singleWord_start = 0;
-		for(int i = qMin(col,tmp_line.length()-1); i >= 0; i--) {
-			QChar ch = tmp_line.at(i);
-			if( ! (ch.isLetter() || ch == '-' || ch == '\'') )
-			{
-				m_singleWord_start = i+1;
-				break;
-			}
-			m_wordUnderCursor = ch + m_wordUnderCursor;
-		}
-		// find end of word:
-		m_singleWord_end = tmp_line.length();
-		for(int i = col+1; i < tmp_line.length(); i++) {
-			QChar ch = tmp_line.at(i);
-			if( ! (ch.isLetter() || ch == '-' || ch == '\'') )
-			{
-				m_singleWord_end = i;
-				break;
-			}
-			m_wordUnderCursor += ch;
-		}
-		if( ! m_wordUnderCursor.isEmpty() )
-		{
-			m_singleWord = true;
-			m_singleWord_line = line;
-		} else {
-                        m_notAvailable = new KAction(i18n("(not available)"), this );
-                        actionCollection()->addAction("dt_n_av", m_notAvailable);
-                        connect( m_notAvailable, SIGNAL(triggered(bool)), this, SLOT(slotNotAvailable()) );
-			m_menu->addAction(m_notAvailable);
-			return;
-		}
-	}
-
-	KComponentData inst=componentData();
-
-	QList<KDataToolInfo> tools;
-	tools += KDataToolInfo::query( "QString", "text/plain", inst );
-	if( m_singleWord )
-		tools += KDataToolInfo::query( "QString", "application/x-singleword", inst );
-
-	m_actionList = KDataToolAction::dataToolActionList( tools, this,
-		SLOT(slotToolActivated(KDataToolInfo,QString)),
-                                                            actionCollection());
-
-	foreach (QAction* ac, m_actionList)
-		m_menu->addAction(ac);
-
-	if( m_actionList.isEmpty() ) {
-                m_notAvailable = new KAction(i18n("(not available)"), this);
-                actionCollection()->addAction("dt_n_av", m_notAvailable);
-                connect( m_notAvailable, SIGNAL(triggered(bool)), this, SLOT(slotNotAvailable()) );
-		m_menu->addAction(m_notAvailable);
-	}
-}
-
-void KDataToolPluginView::slotNotAvailable()
-{
-	KMessageBox::sorry(0, i18n("Data tools are only available when text is selected, "
-		"or when the right mouse button is clicked over a word. If no data tools are offered "
-		"even when text is selected, you need to install them. Some data tools are part "
-		"of the KOffice package."));
-}
-
-void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QString &command )
-{
-
-	KDataTool* tool = info.createTool( );
-	if ( !tool )
-	{
-		kWarning() << "Could not create Tool !";
-		return;
-	}
-
-	QString text;
-	if ( m_view->selection() )
-		text = m_view->selectionText();
-	else
-		text = m_wordUnderCursor;
-
-	QString mimetype = "text/plain";
-	QString datatype = "QString";
-
-	// If unsupported (and if we have a single word indeed), try application/x-singleword
-	if ( !info.mimeTypes().contains( mimetype ) && m_singleWord )
-		mimetype = "application/x-singleword";
-
-	kDebug( 13040 ) << "Running tool with datatype=" << datatype << " mimetype=" << mimetype;
-
-	QString origText = text;
-
-	if ( tool->run( command, &text, datatype, mimetype) )
-	{
-		kDebug( 13040 ) << "Tool ran. Text is now " << text;
-		if ( origText != text )
-		{
-			if ( !m_view->selection() )
-			{
-				m_view->setSelection(KTextEditor::Range(m_singleWord_line, m_singleWord_start, m_singleWord_line, m_singleWord_end));
-			}
-
-			// replace selection with 'text'
-			m_view->removeSelectionText();
-			m_view->document()->insertText(m_view->cursorPosition(), text);
-			 // fixme: place cursor at the end:
-			 /* No idea yet (Joseph Wenninger)
-			 for ( uint i = 0; i < text.length(); i++ ) {
-				viewCursorInterface(m_view)->cursorRight();
-			 } */
-		}
-	}
-
-	delete tool;
-}
-
-
-}

part/plugins/kdatatool/kate_kdatatool.h

-/* This file is part of the KDE libraries
-   Copyright (C) 2002 Joseph Wenninger <jowenn@jowenn.at> and Daniel Naber <daniel.naber@t-online.de>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License version 2 as published by the Free Software Foundation.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
- */
-
-#ifndef _KATE_KDATATOOL_
-#define _KATE_KDATATOOL_
-
-#include <ktexteditor/plugin.h>
-#include <QtCore/QVariantList>
-#include <kxmlguiclient.h>
-#include <QtCore/QPointer>
-
-class KActionMenu;
-class KDataToolInfo;
-
-namespace KTextEditor
-{
-
-class View;
-
-class KDataToolPlugin : public KTextEditor::Plugin
-{
-	Q_OBJECT
-
-public:
-	explicit KDataToolPlugin( QObject *parent = 0, const QVariantList &args = QVariantList() );
-	virtual ~KDataToolPlugin();
-
-	virtual void addView (KTextEditor::View *view);
-	virtual void removeView (KTextEditor::View *view);
-
-  private:
-	QList<class KDataToolPluginView*> m_views;
-};
-
-
-class KDataToolPluginView : public QObject, public KXMLGUIClient
-{
-	Q_OBJECT
-
-public:
-	KDataToolPluginView( KTextEditor::View *view );
-	virtual ~KDataToolPluginView();
-	View* view() const;
-private:
-	View *m_view;
-	bool m_singleWord;
-	int m_singleWord_line, m_singleWord_start, m_singleWord_end;
-	QString m_wordUnderCursor;
-	QList<QAction*> m_actionList;
-	QPointer<KActionMenu> m_menu;
-	QAction *m_notAvailable;
-protected Q_SLOTS:
-	void aboutToShow();
-	void slotToolActivated( const KDataToolInfo &datatoolinfo, const QString &string );
-	void slotNotAvailable();
-};
-
-}
-
-#endif

part/plugins/kdatatool/ktexteditor_kdatatool.desktop

-[Desktop Entry]
-X-KDE-Library=ktexteditor_kdatatool
-X-KDE-PluginInfo-Author=
-X-KDE-PluginInfo-Email=
-X-KDE-PluginInfo-Name=ktexteditorkdatatool
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-Website=http://kate.kde.org
-X-KDE-PluginInfo-Category=Editor
-X-KDE-PluginInfo-Depends=
-X-KDE-PluginInfo-License=GPL
-X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-ParentApp=kate
-X-KDE-Version=4.0
-X-KDE-ServiceTypes=KTextEditor/Plugin
-Type=Service
-Icon=tools-check-spelling
-Name=Data Tools
-Name[bg]=Инструменти за данни
-Name[bs]=Alatke podataka
-Name[ca]=Eines de dades
-Name[ca@valencia]=Eines de dades
-Name[cs]=Datové nástroje
-Name[da]=Dataværktøjer
-Name[de]=Datenwerkzeuge
-Name[el]=Εργαλεία δεδομένων
-Name[en_GB]=Data Tools
-Name[es]=Herramientas de datos
-Name[et]=Andmete tööriistad
-Name[eu]=Datu-tresnak
-Name[fi]=Datatyökalut
-Name[fr]=Outils de données
-Name[ga]=Uirlisí Sonraí
-Name[gl]=Ferramentas de datos
-Name[he]=כלי נתונים
-Name[hu]=Adatkezelő eszközök
-Name[ia]=Instrumentos de datos
-Name[it]=Strumenti per i dati
-Name[ja]=データツール
-Name[kk]=Дерек құралдары
-Name[km]=ឧបករណ៍​ទិន្នន័យ​
-Name[ko]=데이터 도구
-Name[lt]=Duomenų įrankiai
-Name[lv]=Datu rīki
-Name[ms]=Alatan Data
-Name[nb]=Dataverktøy
-Name[nds]=Datenwarktüüch
-Name[nl]=Gegevenshulpmiddelen
-Name[nn]=Dataverktøy
-Name[pa]=ਡਾਟਾ ਟੂਲ
-Name[pl]=Narzędzia danych
-Name[pt]=Ferramentas de Dados
-Name[pt_BR]=Ferramentas de dados
-Name[ro]=Unelte de date
-Name[ru]=Обработка данных
-Name[si]=දත්ත මෙවලම්
-Name[sk]=Dátové nástroje
-Name[sl]=Podatkovna orodja
-Name[sr]=Алатке за податке
-Name[sr@ijekavian]=Алатке за податке
-Name[sr@ijekavianlatin]=Alatke za podatke
-Name[sr@latin]=Alatke za podatke
-Name[sv]=Dataverktyg
-Name[tg]=Асбобҳои маълумот
-Name[tr]=Veri Araçları
-Name[ug]=سانلىق-مەلۇمات قورالى
-Name[uk]=Засоби роботи з даними
-Name[wa]=Usteyes po les dnêyes
-Name[x-test]=xxData Toolsxx
-Name[zh_CN]=数据工具
-Name[zh_TW]=資料工具
-Comment=Enable data tools like thesaurus and spell check (if installed)
-Comment[bg]=Инструменти за данни – като речници, правопис и др. (ако са инсталирани)
-Comment[bs]=Omogućuje alate podataka kao što je tragač sinonima i provjera pravopisa
-Comment[ca]=Habilita les eines per a la gestió de dades, com ara el tesaurus i el corrector ortogràfic (si estan instal·lats)
-Comment[ca@valencia]=Habilita les eines per a la gestió de dades, com ara el tesaurus i el corrector ortogràfic (si estan instal·lats)
-Comment[cs]=Povolí datové nástroje jako tezaurus nebo kontrolu pravopisu (pokud jsou nainstalovány)
-Comment[da]=Aktivér dataværktøjer som begrebsordbog og stavekontrol (hvis installeret)
-Comment[de]=Dienstprogrammen wie Thesaurus und Rechtschreibprüfung aktivieren (falls installiert)
-Comment[el]=Ενεργοποίηση εργαλείων δεδομένων όπως τον θησαυρό και τον ορθογραφικό έλεγχο (αν έχει εγκατασταθεί)
-Comment[en_GB]=Enable data tools like thesaurus and spell check (if installed)
-Comment[es]=Activa herramientas como el tesauro y la comprobación ortográfica (si están instaladas)
-Comment[et]=Andmete tööriistad, näiteks thesaurus ja õigekirja kontroll
-Comment[eu]=Gaitu thesaurus eta ortografia zuzentzaileen moduko datu-tresnak (instalatuta badaude)
-Comment[fi]=Käytä datatyökaluja, kuten synonyymisanakirjaa ja oikolukua (jos asennettu)
-Comment[fr]=Active les outils de données comme le thésaurus et la vérification de l'orthographe (si installés)
-Comment[ga]=Cumasaigh uirlisí mar litreoir agus foclóir (má tá siad ar fáil)
-Comment[gl]=Activar as ferramentas de datos como sinónimos e corrección ortográfica (se estiveren instaladas)
-Comment[hu]=Adatkezelő eszközök bekapcsolása (például szinonímaszótár, helyesírás-ellenőrző)
-Comment[ia]=Habilita instrumentos de datos como le thesauro e le controlo orthographic (si illos es installate)
-Comment[it]=Abilita strumenti per i dati come il glossario ed il controllo ortografico (se installati)
-Comment[kk]=Теузаурус пен емле тексеру секілді (егер орнатылған болса) деректерді өңдеу құралдарды пайдалануға мүмкіншілік береді
-Comment[km]=បើក​ឧបករណ៍​ទិន្នន័យ​ដូច​កម្រង​វេវចនសព្ទ​ និង​​ការ​​ពិនិត្យ​អក្ខរាវិរុទ្ធ (​បើ​បាន​ដំឡើង​)
-Comment[ko]=맞춤법 검사기와 사전 등의 데이터 도구 사용 (설치된 경우)
-Comment[lt]=Įjungti duomenų įrankius, tokius kaip tezauras ir rašybos tikrinimas (jei jie įdiegti)
-Comment[lv]=Aktivizēt datu rīkus kā tēzauru un pareizrakstības pārbaudi (ja instalēta)
-Comment[nb]=Skru på dataverktøy som ordbok og stavekontroll (hvis det er installert)
-Comment[nds]=Warktüüch as Thesaurus oder Klookschriever anmaken (wenn installeert)
-Comment[nl]=Activering van hulpprogramma's, zoals de thesaurus en spellingcontrole (indien geïnstalleerd)
-Comment[pa]=ਡਾਟਾ ਟੂਲ ਜਿਵੇਂ ਕਿ ਥੀਸਾਰਾਉਸ ਤੇ ਸ਼ਬਦ-ਜੋੜ ਆਦਿ ਯੋਗ (ਜੇਕਰ ਇੰਸਟਾਲ ਹੋਵੇ)
-Comment[pl]=Włącz narzędzia danych takie jak tezaurus i sprawdzanie pisowni (jeżeli zainstalowane)
-Comment[pt]=Permitir as ferramentas de dados como a revisão gramatical e ortográfica (se instalada)
-Comment[pt_BR]=Habilita ferramentas de dados, como dicionário de sinônimos e verificador ortográfico (se instalados)
-Comment[ro]=Activează unelte de date cum ar fi dicționar sau verificare ortografică (dacă sînt instalate)
-Comment[ru]=Обработка данных, например, показ синонимов и проверка орфографии (если они установлены)
-Comment[si]=ශබ්ද කෝශ හා වදන් පිරික්සක (ස්ථාපිත නම්) වැනි දත්ත මෙවලම් සක්‍රීය කරයි
-Comment[sk]=Povoliť dátové nástroje ako synonymá a kontrola pravopisu (ak sú nainštalované)
-Comment[sl]=Omogoči podatkovna orodja, kot sta tezaver in preverjanje črkovanja (če so nameščeni)
-Comment[sr]=Алатке попут синонимара и правописара (ако су инсталирани)
-Comment[sr@ijekavian]=Алатке попут синонимара и правописара (ако су инсталирани)
-Comment[sr@ijekavianlatin]=Alatke poput sinonimara i pravopisara (ako su instalirani)
-Comment[sr@latin]=Alatke poput sinonimara i pravopisara (ako su instalirani)
-Comment[sv]=Aktivera dataverktyg som synonymordlista och stavningskontroll (om installerade)
-Comment[tg]=Фаъолсозии асбобҳои маълумотӣ монанди тезаурус ва санҷиши имло (агар сабт шудааст)
-Comment[tr]=Thesaurus ve imla denetimi gibi araçları (eğer kuruluysa) etkinleştir
-Comment[ug]=thesaurus غا ئوخشاش سانلىق-مەلۇمات قورالى ۋە ئىملا تەكشۈرگۈچنى قوزغات (ئەگەر ئورنىتىلغان بولسا)
-Comment[uk]=Надає доступ до засобів на кшталт словників та перевірки правопису (якщо встановлені)
-Comment[wa]=Mete en alaedje les usteyes po manaedjî les dnêyes, come les diccionaires ou les coridjreces (si astalés)
-Comment[x-test]=xxEnable data tools like thesaurus and spell check (if installed)xx
-Comment[zh_CN]=启用数据工具,如已经安装的 thesaurus 和拼写检查
-Comment[zh_TW]=打開資料工具如同義字典與拼字檢查 (如果有安裝的話)

part/plugins/kdatatool/ktexteditor_kdatatoolui.rc

-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui name="ktexteditor_kdatatoolui" library="ktexteditor_kdatatool" version="4">
-
-<MenuBar>
- <Menu name="tools"><text>&amp;Tools</text>
-    <Separator group="tools_operations" />
-    <Action name="popup_dataTool" group="tools_operations"/>
- </Menu>
-</MenuBar>
-
-<Menu name="ktexteditor_popup">
-  <Action name="popup_dataTool" group="popup_operations"/>
-</Menu>
-
-</gui>

part/plugins/timedate/CMakeLists.txt

-
-########### next target ###############
-
-set(ktexteditor_timedate_PART_SRCS timedate.cpp timedate_config.cpp )
-
-kde4_add_plugin(ktexteditor_timedate ${ktexteditor_timedate_PART_SRCS} )
-
-target_link_libraries(ktexteditor_timedate ${KDE4_KDECORE_LIBS} ktexteditor )
-
-install(TARGETS ktexteditor_timedate DESTINATION ${PLUGIN_INSTALL_DIR} )
-
-########### install files ###############
-
-install(FILES timedateui.rc DESTINATION ${DATA_INSTALL_DIR}/ktexteditor_timedate )
-
-install(FILES ktexteditor_timedate.desktop
-              ktexteditor_timedate_config.desktop DESTINATION ${SERVICES_INSTALL_DIR} )

part/plugins/timedate/ktexteditor_timedate.desktop

-[Desktop Entry]
-X-KDE-Library=ktexteditor_timedate
-X-KDE-PluginKeyword=ktexteditor_timedate
-X-KDE-PluginInfo-Author=Rafael Fernández López
-X-KDE-PluginInfo-Email=ereslibre@kde.org
-X-KDE-PluginInfo-Name=ktexteditortimedate
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-Website=http://kate.kde.org
-X-KDE-PluginInfo-Category=Editor
-X-KDE-PluginInfo-Depends=
-X-KDE-PluginInfo-License=GPL
-X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-ParentApp=kate
-X-KDE-Version=4.0
-X-KDE-ServiceTypes=KTextEditor/Plugin
-Type=Service
-Icon=office-calendar
-Name=Time & Date
-Name[bg]=Час и дата
-Name[bs]=Vrijeme i datum
-Name[ca]=Hora i data
-Name[ca@valencia]=Hora i data
-Name[cs]=Datum a čas
-Name[da]=Tid og dato
-Name[de]=Zeit & Datum
-Name[el]=Ώρα & ημερομηνία
-Name[en_GB]=Time & Date
-Name[es]=Fecha y hora
-Name[et]=Kuupäev ja kellaaeg
-Name[eu]=Ordua eta data
-Name[fi]=Aika ja päivämäärä
-Name[fr]=Date et heure
-Name[ga]=Am agus Dáta
-Name[gl]=Data e hora
-Name[he]=תאריך ושעה
-Name[hu]=Dátum és idő
-Name[ia]=Tempore & Data
-Name[it]=Data e ora
-Name[ja]=時間と日付
-Name[kk]=Уақыт пен күн
-Name[km]=ពេលវេលា និង​កាល​បរិច្ឆេទ​
-Name[ko]=날짜와 시간
-Name[lt]=Laikas ir data
-Name[lv]=Laiks un datums
-Name[ms]=Masa & Tarikh
-Name[nb]=Dato og klokkeslett
-Name[nds]=Tiet un Datum
-Name[nl]=Tijd & datum
-Name[nn]=Dato og klokkeslett
-Name[pa]=ਟਾਇਮ ਅਤੇ ਮਿਤੀ
-Name[pl]=Czas i data
-Name[pt]=Data & Hora
-Name[pt_BR]=Data e hora
-Name[ro]=Data și ora
-Name[ru]=Дата и время
-Name[si]=දිනය හා වේලාව
-Name[sk]=Čas a dátum
-Name[sl]=Čas in datum
-Name[sr]=Време и датум
-Name[sr@ijekavian]=Вријеме и датум
-Name[sr@ijekavianlatin]=Vrijeme i datum
-Name[sr@latin]=Vreme i datum
-Name[sv]=Tid och datum
-Name[tg]=Вақт ва сана
-Name[tr]=Saat ve Tarih
-Name[ug]=ۋاقىت & چېسلا
-Name[uk]=Час і дата
-Name[x-test]=xxTime & Datexx
-Name[zh_CN]=时间和日期
-Name[zh_TW]=時間與日期
-Comment=Insert current Time & Date
-Comment[bg]=Вмъкване на текущите час и дата
-Comment[bs]=Ubaci trenutno vrijeme i datum
-Comment[ca]=Insereix l'hora i la data actuals
-Comment[ca@valencia]=Insereix l'hora i la data actuals
-Comment[cs]=Vložit aktuální datum a čas
-Comment[da]=Indsæt nuværende tid og dato
-Comment[de]=Einfügen von Uhrzeit & Datum
-Comment[el]=Εισαγωγή τρέχουσας ώρας & ημερομηνίας
-Comment[en_GB]=Insert current Time & Date
-Comment[es]=Insertar fecha y hora actuales
-Comment[et]=Praeguse kellaaja ja kuupäeva lisamine
-Comment[eu]=Txertatu uneko ordua eta data
-Comment[fi]=Lisää nykyinen aika ja päivämäärä
-Comment[fr]=Insertion de la date et de l'heure actuelles
-Comment[ga]=Ionsáigh an tAm agus an Dáta reatha
-Comment[gl]=Insere a data e hora actuais
-Comment[hu]=Aktuális dátum és idő beszúrása
-Comment[ia]=Inserta le tempore e le data currente 
-Comment[it]=Inserisce la data ed ora correnti
-Comment[ja]=現在の日時を挿入
-Comment[kk]=Уақыт пен күн белгісін қою
-Comment[km]=បញ្ចូល​ពេល​វេលា​បច្ចុប្បន្ន និង​កាលបរិច្ឆេទ​
-Comment[ko]=현재 날짜와 시간 삽입
-Comment[lt]=Įterpti dabartinį laiką ir datą
-Comment[lv]=Ievietot pašreizējo laiku un datumu
-Comment[ms]=Masukkan Masa & Tarikh semasa
-Comment[nb]=Sett inn nåværende dato og klokkeslett
-Comment[nds]=Aktuell Tiet un Datum infögen
-Comment[nl]=Huidige datum en tijd invoegen
-Comment[nn]=Set inn gjeldande dato og klokkeslett
-Comment[pa]=ਮੌਜੂਦਾ ਟਾਇਮ ਅਤੇ ਮਿਤੀ ਸ਼ਾਮਲ ਕਰੋ
-Comment[pl]=Wstaw aktualny czas i datę
-Comment[pt]=Inserir a data & hora actual
-Comment[pt_BR]=Inserir a data e hora atual
-Comment[ro]=Inserează data și ora curentă
-Comment[ru]=Вставка текущей даты и времени
-Comment[si]=වත්මන් දිනය හා වේලාව ඇතුළත් කරන්න
-Comment[sk]=Vložiť aktuálny dátum a čas
-Comment[sl]=Vstavi trenutni čas in datum
-Comment[sr]=Умеће тренутно време и датум
-Comment[sr@ijekavian]=Умеће тренутно вријеме и датум
-Comment[sr@ijekavianlatin]=Umeće trenutno vrijeme i datum
-Comment[sr@latin]=Umeće trenutno vreme i datum
-Comment[sv]=Infoga aktuell tid och datum
-Comment[tg]=Дарҷи сана ва вақти ҷорӣ
-Comment[tr]=Geçerli Saat ve Tarihi Ekle
-Comment[ug]=نۆۋەتتىكى چېسلا ۋە ۋاقىتنى قىستۇر
-Comment[uk]=Вставити поточний час і дату
-Comment[x-test]=xxInsert current Time & Datexx
-Comment[zh_CN]=插入当前时间和日期
-Comment[zh_TW]=插入目前的時間與日期

part/plugins/timedate/ktexteditor_timedate_config.desktop

-[Desktop Entry]
-Type=Service
-X-KDE-ServiceTypes=KCModule
-X-KDE-Library=ktexteditor_timedate
-X-KDE-PluginKeyword=ktexteditor_timedate_config
-X-KDE-ParentComponents=ktexteditortimedate
-Name=Format of Time & Date insertion
-Name[bg]=Формат на въвежданите дата и час
-Name[bs]=Format ubacivanja datuma i vremena
-Name[ca]=Format d'inserció de l'hora i la data
-Name[ca@valencia]=Format d'inserció de l'hora i la data
-Name[cs]=Formát vložení data a času
-Name[da]=Format for indsættelse af tid og dato
-Name[de]=Format für das Einfügen von Uhrzeit & Datum
-Name[el]=Μορφή εισαγωγής ώρας & ημερομηνίας
-Name[en_GB]=Format of Time & Date insertion
-Name[es]=Inserción de formato de fecha y hora
-Name[et]=Kellaaja ja kuupäeva lisamise vorming
-Name[eu]=Ordua eta data txertatzeko formatua
-Name[fi]=Ajan ja päivämäärän lisäämisen muoto
-Name[fr]=Format d'insertion de la date et de l'heure
-Name[ga]=Formáid Ionsáite Ama agus Dáta
-Name[gl]=Formato da data e hora inseridas
-Name[hu]=Dátum- és időformátum
-Name[ia]=Insertion de le formato de tempore e data 
-Name[it]=Formato dell'ora e inserimento data
-Name[ja]=挿入する日時の形式
-Name[kk]=Уақыт пен күннің қойылатын пішімі
-Name[km]=ទ្រង់ទ្រាយ​ការ​បញ្ចូល​ ពេលវេលា និង​​កាល​បរិច្ឆេទ​
-Name[ko]=날짜 및 시간 형식 지정
-Name[lt]=Laiko ir datos įterpimo formatas
-Name[lv]=Ievietojamā laika un datuma formāts
-Name[nb]=Format for innsatt dato og klokkeslett
-Name[nds]=Formaat för inföögt Tiet un Datum
-Name[nl]=Opmaak van ingevoegde datum en tijd
-Name[nn]=Format for innsett dato og klokkeslett
-Name[pa]=ਟਾਇਮ ਅਤੇ ਮਿਤੀ ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਫਾਰਮੈਟ
-Name[pl]=Format wstawiania czasu i daty
-Name[pt]=Formato da introdução de Datas & Horas
-Name[pt_BR]=Formato da inserção da data e hora
-Name[ro]=Formatul inserției de dată și oră
-Name[ru]=Формат даты и времени
-Name[si]=දිනය හා වෙලාව ඇතුළත් කිරීමේ හැඩසවිය
-Name[sk]=Formát vloženia času a dátumu
-Name[sl]=Oblika vstavljenega časa in datuma
-Name[sr]=Формат уметања времена и датума
-Name[sr@ijekavian]=Формат уметања времена и датума
-Name[sr@ijekavianlatin]=Format umetanja vremena i datuma
-Name[sr@latin]=Format umetanja vremena i datuma
-Name[sv]=Format för att infoga tid och datum
-Name[tg]=Дарҷи формати вақи ва сана
-Name[tr]=Saat ve Tarih Ekleme biçimi
-Name[ug]=ۋاقىت ۋە چېسلا قىستۇرۇش پىچىمى
-Name[uk]=Формат часу і дати для вставлення
-Name[x-test]=xxFormat of Time & Date insertionxx
-Name[zh_CN]=所插入时间和日期的格式
-Name[zh_TW]=插入時間與日期的格式

part/plugins/timedate/timedate.cpp

-/**
-  * This file is part of the KDE libraries
-  * Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#include "timedate.h"
-#include "timedate_config.h"
-
-#include <ktexteditor/document.h>
-
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-#include <klocale.h>
-#include <kaction.h>
-#include <kactioncollection.h>
-#include <kdatetime.h>
-#include <kconfiggroup.h>
-
-TimeDatePlugin *TimeDatePlugin::plugin = 0;
-
-K_PLUGIN_FACTORY_DEFINITION(TimeDatePluginFactory,
-        registerPlugin<TimeDatePlugin>("ktexteditor_timedate");
-        registerPlugin<TimeDateConfig>("ktexteditor_timedate_config");
-        )
-K_EXPORT_PLUGIN(TimeDatePluginFactory("ktexteditor_timedate", "ktexteditor_plugins"))
-
-TimeDatePlugin::TimeDatePlugin(QObject *parent, const QVariantList &args)
-    : KTextEditor::Plugin(parent)
-{
-    Q_UNUSED(args);
-
-    if (localizedTimeDate.isNull())
-    {
-        localizedTimeDate = i18nc("This is a localized string for default time & date printing on kate document."
-                                  "%d means day in XX format."
-                                  "%m means month in XX format."
-                                  "%Y means year in XXXX format."
-                                  "%H means hours in XX format."
-                                  "%M means minutes in XX format."
-                                  "Please, if in your language time or date is written in a different order, change it here",
-                                  "%d-%m-%Y %H:%M");
-    }
-
-    plugin = this;
-    readConfig();
-}
-
-TimeDatePlugin::~TimeDatePlugin()
-{
-    plugin = 0;
-}
-
-void TimeDatePlugin::addView(KTextEditor::View *view)
-{
-    TimeDatePluginView *nview = new TimeDatePluginView(m_string, view);
-    m_views.append(nview);
-}
-
-void TimeDatePlugin::removeView(KTextEditor::View *view)
-{
-    for (int z = 0; z < m_views.size(); z++)
-    {
-        if (m_views.at(z)->parentClient() == view)
-        {
-            TimeDatePluginView *nview = m_views.at(z);
-            m_views.removeAll(nview);
-            delete nview;
-        }
-    }
-}
-
-void TimeDatePlugin::readConfig()
-{
-    KConfigGroup cg(KGlobal::config(), "TimeDate Plugin");
-    m_string = cg.readEntry("string", localizedTimeDate);
-}
-
-void TimeDatePlugin::writeConfig()
-{
-    KConfigGroup cg(KGlobal::config(), "TimeDate Plugin" );
-    cg.writeEntry("string", m_string );
-}
-
-void TimeDatePlugin::setFormat(const QString &format)
-{
-    m_string = format;
-
-    // If the property has been set for the plugin in general, let's set that
-    // property to that value on all views where the plugin has been loaded.
-    foreach (TimeDatePluginView *pluginView, m_views)
-    {
-        pluginView->setFormat(format);
-    }
-}
-
-QString TimeDatePlugin::format() const
-{
-    return m_string;
-}
-
-TimeDatePluginView::TimeDatePluginView(const QString &string,
-                                       KTextEditor::View *view)
-  : QObject(view)
-  , KXMLGUIClient(view)
-  , m_view(view)
-  , m_string(string)
-{
-    setComponentData(TimeDatePluginFactory::componentData());
-
-    KAction *action = new KAction(i18n("Insert Time && Date"), this);
-    actionCollection()->addAction("tools_insert_timedate", action);
-    action->setShortcut(Qt::CTRL + Qt::Key_D);
-    connect(action, SIGNAL(triggered()), this, SLOT(slotInsertTimeDate()));
-
-    setXMLFile("timedateui.rc");
-}
-
-TimeDatePluginView::~TimeDatePluginView()
-{
-}
-
-void TimeDatePluginView::setFormat(const QString &format)
-{
-    m_string = format;
-}
-
-QString TimeDatePluginView::format() const
-{
-    return m_string;
-}
-
-void TimeDatePluginView::slotInsertTimeDate()
-{
-    KDateTime dt(QDateTime::currentDateTime());
-    m_view->document()->insertText(m_view->cursorPosition(), dt.toString(m_string));
-}
-
-#include "timedate.moc"

part/plugins/timedate/timedate.h

-/**
-  * This file is part of the KDE libraries
-  * Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#ifndef TIMEDATE_H
-#define TIMEDATE_H
-
-#include <ktexteditor/plugin.h>
-#include <ktexteditor/view.h>
-#include <kxmlguiclient.h>
-#include <klocalizedstring.h>
-#include <kpluginfactory.h>
-
-#include <QtCore/QEvent>
-#include <QtCore/QObject>
-#include <QtCore/QList>
-#include <QtCore/QVariantList>
-
-static QString localizedTimeDate;
-
-class TimeDatePlugin
-  : public KTextEditor::Plugin
-{
-  public:
-    explicit TimeDatePlugin(QObject *parent = 0,
-                            const QVariantList &args = QVariantList());
-    virtual ~TimeDatePlugin();
-
-    static TimeDatePlugin *self() { return plugin; }
-
-    void addView (KTextEditor::View *view);
-    void removeView (KTextEditor::View *view);
-
-    void readConfig();
-    void writeConfig();
-
-    virtual void readConfig (KConfig *) {}
-    virtual void writeConfig (KConfig *) {}
-
-    void setFormat(const QString &format);
-    QString format() const;
-
-  private:
-    static TimeDatePlugin *plugin;
-    QList<class TimeDatePluginView*> m_views;
-    QString m_string;
-};
-
-class TimeDatePluginView
-   : public QObject, public KXMLGUIClient
-{
-  Q_OBJECT
-
-  public:
-    explicit TimeDatePluginView(const QString &string,
-                                KTextEditor::View *view = 0);
-    ~TimeDatePluginView();
-
-    void setFormat(const QString &format);
-    QString format() const;
-
-  private Q_SLOTS:
-    void slotInsertTimeDate();
-
-  private:
-    KTextEditor::View *m_view;
-    QString m_string;
-};
-
-K_PLUGIN_FACTORY_DECLARATION(TimeDatePluginFactory)
-
-#endif // TIMEDATE_H

part/plugins/timedate/timedate_config.cpp

-/**
-  * This file is part of the KDE libraries
-  * Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#include "timedate_config.h"
-#include "timedate.h"
-
-#include <QtGui/QLabel>
-#include <QtGui/QBoxLayout>
-
-#include <klocale.h>
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
-#include <klineedit.h>
-#include <kconfiggroup.h>
-
-TimeDateConfig::TimeDateConfig(QWidget *parent, const QVariantList &args)
-    : KCModule(TimeDatePluginFactory::componentData(), parent, args)
-{
-    QVBoxLayout *layout = new QVBoxLayout(this);
-
-    QLabel *info = new QLabel(i18n(
-     "%y\t2-digit year excluding century (00 - 99)\n"
-     "%Y\tfull year number\n"
-     "%:m\tmonth number, without leading zero (1 - 12)\n"
-     "%m\tmonth number, 2 digits (01 - 12)\n"
-     "%b\tabbreviated month name\n"
-     "%B\tfull month name\n"
-     "%e\tday of the month (1 - 31)\n"
-     "%d\tday of the month, 2 digits (01 - 31)\n"
-     "%a\tabbreviated weekday name\n"
-     "%A\tfull weekday name\n"
-     "\n"
-     "%H\thour in the 24 hour clock, 2 digits (00 - 23)\n"
-     "%k\thour in the 24 hour clock, without leading zero (0 - 23)\n"
-     "%I\thour in the 12 hour clock, 2 digits (01 - 12)\n"
-     "%l\thour in the 12 hour clock, without leading zero (1 - 12)\n"
-     "%M\tminute, 2 digits (00 - 59)\n"
-     "%S\tseconds (00 - 59)\n"
-     "%P\t\"am\" or \"pm\"\n"
-     "%p\t\"AM\" or \"PM\"\n"));
-
-    // It is possible that the plugin has not been loaded yet, and the
-    // configuration dialog has been asked to be shown. In that case, it is our
-    // turn to set the static string to the correct value.
-    if (localizedTimeDate.isNull())
-    {
-        localizedTimeDate = i18nc("This is a localized string for default time & date printing on kate document."
-                                  "%d means day in XX format."
-                                  "%m means month in XX format."
-                                  "%Y means year in XXXX format."
-                                  "%H means hours in XX format."
-                                  "%M means minutes in XX format."
-                                  "Please, if in your language time or date is written in a different order, change it here",
-                                  "%d-%m-%Y %H:%M");
-    }
-
-    QHBoxLayout *hlayout = new QHBoxLayout(this);
-    QLabel *lformat = new QLabel(i18n("Format"));
-    format = new KLineEdit(this);
-    hlayout->addWidget(lformat);
-    hlayout->addWidget(format);
-
-    layout->addWidget(info);
-    layout->addLayout(hlayout);
-
-    setLayout(layout);
-
-    load();
-
-    QObject::connect(format, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
-}
-
-TimeDateConfig::~TimeDateConfig()
-{
-}
-
-void TimeDateConfig::save()
-{
-    if (TimeDatePlugin::self())
-    {
-        TimeDatePlugin::self()->setFormat(format->text());
-        TimeDatePlugin::self()->writeConfig();
-    }
-    else
-    {
-        KConfigGroup cg(KGlobal::config(), "TimeDate Plugin");
-        cg.writeEntry("string", format->text());
-    }
-
-    emit changed(false);
-}
-
-void TimeDateConfig::load()
-{
-    if (TimeDatePlugin::self())
-    {
-        TimeDatePlugin::self()->readConfig();
-        format->setText(TimeDatePlugin::self()->format());
-    }
-    else
-    {
-        KConfigGroup cg(KGlobal::config(), "TimeDate Plugin" );
-        format->setText(cg.readEntry("string", localizedTimeDate));
-    }
-
-    emit changed(false);
-}
-
-void TimeDateConfig::defaults()
-{
-    format->setText(localizedTimeDate);
-
-    emit changed(true);
-}
-
-void TimeDateConfig::slotChanged()
-{
-    emit changed(true);
-}
-
-#include "timedate_config.moc"

part/plugins/timedate/timedate_config.h

-/**
-  * This file is part of the KDE libraries
-  * Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License version 2 as published by the Free Software Foundation.
-  *
-  * This library is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#ifndef TIMEDATE_CONFIG_H
-#define TIMEDATE_CONFIG_H
-
-#include <kcmodule.h>
-
-class KLineEdit;
-
-class TimeDateConfig
-    : public KCModule
-{
-    Q_OBJECT
-
-public:
-    explicit TimeDateConfig(QWidget *parent = 0, const QVariantList &args = QVariantList());
-    virtual ~TimeDateConfig();
-
-    virtual void save();
-    virtual void load();
-    virtual void defaults();
-
-private Q_SLOTS:
-    void slotChanged();
-
-private:
-    KLineEdit *format;
-};
-
-#endif // TIMEDATE_CONFIG_H

part/plugins/timedate/timedateui.rc

-<!DOCTYPE kpartgui>
-<gui name="ktexteditor_timedate" library="ktexteditor_timedate" version="2">
-<MenuBar>
- <Menu name="tools"><text>&amp;Tools</text>
-    <Separator group="tools_operations" />
-    <Action name="tools_insert_timedate" group="tools_operations"/>
- </Menu>
-</MenuBar>
-</gui>