Address Issue 1298: Add Auto-replace text feature, borrowed from LL~

This commit is contained in:
Inusaito Sayori
2014-04-08 02:12:51 -04:00
parent 0b2d019e61
commit b1d18c7f29
24 changed files with 10668 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 B

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="autoreplace_floater" title="Einstellungen für automatische Ersetzung...">
<check_box label="Automatische Ersetzung aktivieren..." name="autoreplace_enable" tool_tip="Eines oder mehrere Schlüsselwörter bei der Eingabe von Chat-Text durch die entsprechende Ersetzung substituieren"/>
<button label="Liste importieren..." name="autoreplace_import_list" tool_tip="Exportierte Liste aus einer Datei laden."/>
<button label="Liste exportieren..." name="autoreplace_export_list" tool_tip="Ausgewählte Liste zur Weitergabe in einer Datei speichern."/>
<button label="Neue Liste..." name="autoreplace_new_list" tool_tip="Neue Liste erstellen."/>
<button label="Liste löschen" name="autoreplace_delete_list" tool_tip="Ausgewählte Liste löschen."/>
<button name="autoreplace_list_up" tool_tip="Dieser Liste eine höhere Priorität einräumen."/>
<button name="autoreplace_list_down" tool_tip="Dieser Liste eine niedrigere Priorität einräumen."/>
<scroll_list name="autoreplace_list_replacements">
<scroll_list.columns label="Schlüsselwort" name="Keyword"/>
<scroll_list.columns label="Ersetzung" name="Replacement"/>
</scroll_list>
<button label="Hinzufügen..." name="autoreplace_add_entry"/>
<button label="Entfernen" name="autoreplace_delete_entry"/>
<button label="Eintrag speichern" name="autoreplace_save_entry" tool_tip="Diesen Eintrag speichern."/>
<button label="Änderungen speichern" name="autoreplace_save_changes" tool_tip="Alle Änderungen speichern."/>
<button label="Abbrechen" name="autoreplace_cancel" tool_tip="Alle Änderungen löschen."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->

View File

@@ -0,0 +1,291 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
border="true"
can_close="true"
can_minimize="true"
can_resize="false"
help_topic="autoreplace_settings"
save_rect="true"
height="455"
width="490"
name="autoreplace_floater"
title="Auto-Replace Settings">
<check_box
bottom="-40"
left_delta="15"
height="16"
width="100"
follows="left|top"
label="Enable Auto-Replace"
name="autoreplace_enable"
tool_tip="As you enter chat text, replace any of the keywords entered with the corresponding replacement"/>
<view_border
bottom_delta="-15"
left="2"
height="0"
width="491"
follows="left|top"
bevel_style="none"
border_thickness="1"
mouse_opaque="false"
name="divisor1"/>
<button
bottom_delta="-30"
left="10"
height="22"
width="110"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_import_list"
label="Import List..."
tool_tip="Load a previously exported list from a file."/>
<button
bottom_delta="0"
left_delta="120"
height="22"
width="110"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_export_list"
label="Export List..."
tool_tip="Save the selected list to a file so you can share it."/>
<button
bottom_delta="0"
left_delta="120"
height="22"
width="110"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_new_list"
label="New List..."
tool_tip="Create a new list."/>
<button
bottom_delta="0"
left_delta="120"
height="22"
width="110"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_delete_list"
label="Delete List"
tool_tip="Delete the selected list."/>
<scroll_list
bottom_delta="-112"
left="10"
height="100"
width="370"
follows="left|top"
column_padding="0"
draw_heading="false"
multi_select="false"
name="autoreplace_list_name"
search_column="0">
</scroll_list>
<button
bottom_delta="56"
left_delta="380"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_list_up"
image_overlay="up_arrow.tga"
label=""
tool_tip="Move this list up in priority."/>
<button
bottom_delta="-32"
left_delta="0"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_list_down"
image_overlay="down_arrow.tga"
label=""
tool_tip="Move this list down in priority."/>
<view_border
bottom_delta="-36"
left="2"
height="0"
width="491"
follows="left|top"
bevel_style="none"
border_thickness="1"
mouse_opaque="false"
name="divisor2"/>
<scroll_list
bottom_delta="-130"
left="10"
height="120"
width="370"
follows="left|top"
column_padding="0"
draw_heading="true"
multi_select="true"
name="autoreplace_list_replacements"
search_column="0">
<scroll_list.columns
label="Keyword"
name="Keyword"
relative_width="0.30" />
<scroll_list.columns
label="Replacement"
name="Replacement"
relative_width="0.70" />
</scroll_list>
<button
bottom_delta="64"
left_delta="380"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_add_entry"
label="Add..."/>
<button
bottom_delta="-32"
left_delta="0"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_delete_entry"
label="Remove"/>
<view_border
bottom_delta="-42"
left="2"
height="0"
width="491"
follows="left|top"
bevel_style="none"
border_thickness="1"
mouse_opaque="false"
name="divisor3"/>
<text
type="string"
follows="left|top"
height="16"
layout="topleft"
left="10"
bottom_delta="-29"
width="50">
Keyword:
</text>
<line_editor
name="autoreplace_keyword"
follows="left|top"
height="23"
layout="topleft"
left="100"
max_length_bytes="255"
bottom_delta="0"
width="150"
/>
<text
type="string"
follows="left|top"
height="16"
layout="topleft"
left="10"
right="90"
bottom_delta="-29"
>
Replacement:
</text>
<line_editor
name="autoreplace_replacement"
follows="left|top"
height="23"
layout="topleft"
left="100"
max_length_bytes="255"
bottom_delta="0"
width="280"
/>
<button
bottom_delta="0"
right="-10"
height="22"
width="90"
enabled="false"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_save_entry"
label="Save Entry"
tool_tip="Save this entry."/>
<view_border
bottom_delta="-10"
left="2"
height="0"
width="491"
follows="left|top"
bevel_style="none"
border_thickness="1"
mouse_opaque="false"
name="divisor4"/>
<button
bottom_delta="-29"
right="380"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_save_changes"
label="Save Changes"
tool_tip="Save all changes."/>
<button
bottom_delta="0"
right="480"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="autoreplace_cancel"
label="Cancel"
tool_tip="Discard all changes."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->

View File

@@ -2456,6 +2456,55 @@ Do you want to remove multiple friends from your Friends list?
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
label="Add Auto-Replace List"
name="AddAutoReplaceList"
type="alertmodal">
<tag>addlist</tag>
Name for the new list:
<tag>confirm</tag>
<form name="form">
<input name="listname" type="text"/>
<button
default="true"
index="0"
name="SetName"
text="OK"/>
</form>
</notification>
<notification
icon="alertmodal.tga"
label="Rename Auto-Replace List"
name="RenameAutoReplaceList"
type="alertmodal">
The name '[DUPNAME]' is in use
Enter a new unique name:
<tag>confirm</tag>
<form name="form">
<input name="listname" type="text"/>
<button
default="false"
index="0"
name="ReplaceList"
text="Replace Current List"/>
<button
default="true"
index="1"
name="SetName"
text="Use New Name"/>
</form>
</notification>
<notification
icon="alertmodal.tga"
name="InvalidAutoReplaceEntry"
type="alertmodal">
The keyword must be a single word, and the replacement may not be empty.
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="GodDeleteAllScriptedPublicObjectsByUser"

View File

@@ -172,16 +172,17 @@ To use spellcheck, right-click a misspelled word
(red or otherwise) and select its replacement
</text>
<view_border bevel_style="none" border_thickness="1" bottom_delta="-16" follows="top" height="0" left="5" name="CmdDivisor" width="356"/>
<button bottom_delta="-26" left="12" follows="top" height="20" width="250" label="Autoreplace Preferences" name="autoreplace"/>
<view_border bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top" height="0" left="5" name="CmdDivisor" width="376"/>
<check_box bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="16"
label="Highlight messages if any of them contain the terms" name="KeywordsOn" width="270"/>
<text bottom_delta="-20" follows="top" height="20" left="12" name="keyword_txt1">(separated by commas)</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" left_delta="5" max_length="500" name="KeywordsList" width="300"/>
<text bottom_delta="-24" follows="top" height="20" left_delta="15" name="EmKeyw">Is found within:</text>
<check_box bottom_delta="3" follows="top" height="16" left_delta="100" label="Local Chat Floater" name="KeywordsInChat"/>
<check_box bottom_delta="-15" follows="left|top" height="16" label="Instant Message Floater" name="KeywordsInIM"/>
<check_box bottom_delta="-24" follows="top" height="16" label="Highlight the message in this color:" left_delta="-110" name="KeywordsChangeColor"/>
<text bottom_delta="-24" follows="top" height="20" left_delta="0" name="EmKeyw">Is found within:</text>
<check_box bottom_delta="3" follows="top" height="16" left_delta="80" label="Local Chat Floater" name="KeywordsInChat"/>
<check_box bottom_delta="0" left_delta="120" follows="left|top" height="16" label="Instant Message Floater" name="KeywordsInIM"/>
<check_box bottom_delta="-24" follows="top" height="16" label="Highlight the message in this color:" left_delta="-195" name="KeywordsChangeColor"/>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom_delta="-16" can_apply_immediately="true" color="1, 1, 1, 1" follows="left|top" height="35" left_delta="210" name="KeywordsColor" tool_tip="Click to open Color Picker" width="50"/>
<check_box bottom_delta="-10" follows="top" height="16" left_delta="-210" label="Play this sound alert: (UUID)" name="KeywordsPlaySound"/>
<line_editor bottom_delta="-20" follows="left|top" bevel_style="in" border_style="line" border_thickness="1" height="20" left_delta="-5" max_length="36" name="KeywordsSound" width="300"/>

View File

@@ -404,6 +404,11 @@
<button.commit_callback function="ShowFloater" parameter="Preferences"/>
</button>
</layout_panel>
<layout_panel name="panelautoreplace" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleAutoReplace">
<button bottom="0" height="24" label="Autoreplace" name="auto_replace_btn" image_overlay="icn_toolbar_auto_replace.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" width="50" follows="left|right">
<button.commit_callback function="ShowFloater" parameter="autoreplace"/>
</button>
</layout_panel>
<layout_panel name="paneldisplayname" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleDisplayName">
<button bottom="0" height="24" label="Display Name" name="display_name_btn" image_overlay="icn_toolbar_display_name.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" width="50" follows="left|right">
<button.commit_callback function="ShowFloater" parameter="displayname"/>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="autoreplace_floater" title="Configuración de reemplazo automático">
<check_box label="Habilitar el reemplazo automático" name="autoreplace_enable" tool_tip="Al escribir el texto del chat, reemplaza las palabras clave especificadas con la sustitución correspondiente"/>
<button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carga una lista previamente exportada desde un archivo."/>
<button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Guarda la lista seleccionada en un archivo para poder compartirla."/>
<button label="Lista nueva..." name="autoreplace_new_list" tool_tip="Crea una lista nueva."/>
<button label="Eliminar lista" name="autoreplace_delete_list" tool_tip="Elimina la lista seleccionada."/>
<button name="autoreplace_list_up" tool_tip="Aumenta la prioridad de esta lista."/>
<button name="autoreplace_list_down" tool_tip="Baja la prioridad de esta lista."/>
<scroll_list name="autoreplace_list_replacements">
<scroll_list.columns label="Palabra clave" name="Keyword"/>
<scroll_list.columns label="Reemplazo" name="Replacement"/>
</scroll_list>
<button label="Añadir..." name="autoreplace_add_entry"/>
<button label="Eliminar" name="autoreplace_delete_entry"/>
<button label="Guardar entrada" name="autoreplace_save_entry" tool_tip="Guarda esta entrada."/>
<button label="Guardar cambios" name="autoreplace_save_changes" tool_tip="Guarda todos los cambios."/>
<button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todos los cambios."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="autoreplace_floater" title="Paramètres Rechercher/Remplacer">
<check_box label="Activer la fonction Rechercher/Remplacer" name="autoreplace_enable" tool_tip="Lors de la saisie du texte d&apos;un chat, remplace chaque mot-clé spécifié par la valeur correspondante."/>
<button label="Importer une liste..." name="autoreplace_import_list" tool_tip="Charger une liste précédemment exportée à partir d&apos;un fichier."/>
<button label="Exporter la liste..." name="autoreplace_export_list" tool_tip="Enregistrer la liste sélectionnée dans un fichier afin de pouvoir la partager."/>
<button label="Nouvelle liste..." name="autoreplace_new_list" tool_tip="Créer une nouvelle liste."/>
<button label="Supprimer la liste" name="autoreplace_delete_list" tool_tip="Supprimer la liste sélectionnée."/>
<button name="autoreplace_list_up" tool_tip="Augmenter la priorité de cette liste."/>
<button name="autoreplace_list_down" tool_tip="Diminuer la priorité de cette liste."/>
<scroll_list name="autoreplace_list_replacements">
<scroll_list.columns label="Mot-clé" name="Keyword"/>
<scroll_list.columns label="Remplacement" name="Replacement"/>
</scroll_list>
<button label="Ajouter..." name="autoreplace_add_entry"/>
<button label="Supprimer" name="autoreplace_delete_entry"/>
<button label="Enregistrer" name="autoreplace_save_entry" tool_tip="Enregistrer cette entrée."/>
<button label="Enregistrer les modifications" name="autoreplace_save_changes" tool_tip="Enregistrer toutes les modifications."/>
<button label="Annuler" name="autoreplace_cancel" tool_tip="Ignorer toutes les modifications."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="autoreplace_floater" title="Impostazioni sostituzione automatica">
<check_box label="Attiva sostituzione automatica" name="autoreplace_enable" tool_tip="Quando inserisci testo nella chat, sostituisci le parole chiave inserite con l&apos;elemento sostitutivo corrispondente."/>
<button label="Importa lista..." name="autoreplace_import_list" tool_tip="Carica da file una lista esportata in precedenza."/>
<button label="Esporta lista..." name="autoreplace_export_list" tool_tip="Salva la lista selezionata in un file per condividerla."/>
<button label="Nuova lista..." name="autoreplace_new_list" tool_tip="Crea una nuova lista"/>
<button label="Cancella lista" name="autoreplace_delete_list" tool_tip="Cancella la lista selezionata"/>
<button name="autoreplace_list_up" tool_tip="Aumenta la priorità di questa lista."/>
<button name="autoreplace_list_down" tool_tip="Diminuisci la priorità di questa lista."/>
<scroll_list name="autoreplace_list_replacements">
<scroll_list.columns label="Parola chiave" name="Keyword"/>
<scroll_list.columns label="Sostituzione" name="Replacement"/>
</scroll_list>
<button label="Aggiungi..." name="autoreplace_add_entry"/>
<button label="Rimuovi" name="autoreplace_delete_entry"/>
<button label="Salva elemento" name="autoreplace_save_entry" tool_tip="Salva questo elemento."/>
<button label="Salva modifiche" name="autoreplace_save_changes" tool_tip="Salva tutte le modifiche."/>
<button label="Annulla" name="autoreplace_cancel" tool_tip="Annulla tutte le modifiche."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="autoreplace_floater" title="Configurações da substituição automática">
<check_box label="Habilitar substituição automática" name="autoreplace_enable" tool_tip="Ao inserir texto de bate-papo, substitua quaisquer palavras-chave inseridas pela substituição correspondente"/>
<button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carrega uma lista exportada anteriormente de um arquivo."/>
<button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Salva um arquivo da lista selecionada para compartilhá-la."/>
<button label="Nova lista..." name="autoreplace_new_list" tool_tip="Cria uma nova lista."/>
<button label="Excluir lista" name="autoreplace_delete_list" tool_tip="Exclui a lista selecionada."/>
<button name="autoreplace_list_up" tool_tip="Aumenta a prioridade desta lista."/>
<button name="autoreplace_list_down" tool_tip="Diminui a prioridade desta lista."/>
<scroll_list name="autoreplace_list_replacements">
<scroll_list.columns label="Palavra-chave" name="Keyword"/>
<scroll_list.columns label="Substituição" name="Replacement"/>
</scroll_list>
<button label="Adicionar..." name="autoreplace_add_entry"/>
<button label="Remover" name="autoreplace_delete_entry"/>
<button label="Salvar entrada" name="autoreplace_save_entry" tool_tip="Salva esta entrada."/>
<button label="Salvar alterações" name="autoreplace_save_changes" tool_tip="Salvar todas as alterações."/>
<button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todas as alterações."/>
</floater>
<!--
<text
top_pad="10"
left="10"
height="16"
width="260"
follows="left|top"
halign="center"
mouse_opaque="true"
name="autoreplace_text2">
Entries
</text>
-->