Kill DataConverter (#2554)

* Kill DataConverter

* remove the tests
This commit is contained in:
Michael H
2019-04-09 17:01:04 -04:00
committed by Will
parent 0852d1be9f
commit 136e781c7f
38 changed files with 0 additions and 2089 deletions

View File

@@ -1,6 +0,0 @@
from redbot.core.bot import Red
from .dataconverter import DataConverter
def setup(bot: Red):
bot.add_cog(DataConverter(bot))

View File

@@ -1,174 +0,0 @@
from itertools import chain, starmap
from pathlib import Path
from datetime import datetime
from redbot.core.bot import Red
from redbot.core.utils.data_converter import DataConverter as dc
from redbot.core.config import Config
class SpecResolver(object):
"""
Resolves Certain things for DataConverter
"""
def __init__(self, path: Path):
self.v2path = path
self.resolved = set()
self.available_core_conversions = {
"Bank Accounts": {
"cfg": ("Bank", None, 384734293238749),
"file": self.v2path / "data" / "economy" / "bank.json",
"converter": self.bank_accounts_conv_spec,
},
"Economy Settings": {
"cfg": ("Economy", "config", 1256844281),
"file": self.v2path / "data" / "economy" / "settings.json",
"converter": self.economy_conv_spec,
},
"Mod Log Cases": {
"cfg": ("ModLog", None, 1354799444),
"file": self.v2path / "data" / "mod" / "modlog.json",
"converter": None, # prevents from showing as available
},
"Filter": {
"cfg": ("Filter", "settings", 4766951341),
"file": self.v2path / "data" / "mod" / "filter.json",
"converter": self.filter_conv_spec,
},
"Past Names": {
"cfg": ("Mod", "settings", 4961522000),
"file": self.v2path / "data" / "mod" / "past_names.json",
"converter": self.past_names_conv_spec,
},
"Past Nicknames": {
"cfg": ("Mod", "settings", 4961522000),
"file": self.v2path / "data" / "mod" / "past_nicknames.json",
"converter": self.past_nicknames_conv_spec,
},
"Custom Commands": {
"cfg": ("CustomCommands", "config", 414589031223512),
"file": self.v2path / "data" / "customcom" / "commands.json",
"converter": self.customcom_conv_spec,
},
}
@property
def available(self):
return sorted(
k
for k, v in self.available_core_conversions.items()
if v["file"].is_file() and v["converter"] is not None and k not in self.resolved
)
def unpack(self, parent_key, parent_value):
"""Unpack one level of nesting in a dictionary"""
try:
items = parent_value.items()
except AttributeError:
yield (parent_key, parent_value)
else:
for key, value in items:
yield (parent_key + (key,), value)
def flatten_dict(self, dictionary: dict):
"""Flatten a nested dictionary structure"""
dictionary = {(key,): value for key, value in dictionary.items()}
while True:
dictionary = dict(chain.from_iterable(starmap(self.unpack, dictionary.items())))
if not any(isinstance(value, dict) for value in dictionary.values()):
break
return dictionary
def apply_scope(self, scope: str, data: dict):
return {(scope,) + k: v for k, v in data.items()}
def bank_accounts_conv_spec(self, data: dict):
flatscoped = self.apply_scope(Config.MEMBER, self.flatten_dict(data))
ret = {}
for k, v in flatscoped.items():
outerkey, innerkey = tuple(k[:-1]), (k[-1],)
if outerkey not in ret:
ret[outerkey] = {}
if innerkey[0] == "created_at":
x = int(datetime.strptime(v, "%Y-%m-%d %H:%M:%S").timestamp())
ret[outerkey].update({innerkey: x})
else:
ret[outerkey].update({innerkey: v})
return ret
def economy_conv_spec(self, data: dict):
flatscoped = self.apply_scope(Config.GUILD, self.flatten_dict(data))
ret = {}
for k, v in flatscoped.items():
outerkey, innerkey = (*k[:-1],), (k[-1],)
if outerkey not in ret:
ret[outerkey] = {}
ret[outerkey].update({innerkey: v})
return ret
def mod_log_cases(self, data: dict):
raise NotImplementedError("This one isn't ready yet")
def filter_conv_spec(self, data: dict):
return {(Config.GUILD, k): {("filter",): v} for k, v in data.items()}
def past_names_conv_spec(self, data: dict):
return {(Config.USER, k): {("past_names",): v} for k, v in data.items()}
def past_nicknames_conv_spec(self, data: dict):
flatscoped = self.apply_scope(Config.MEMBER, self.flatten_dict(data))
ret = {}
for config_identifiers, v2data in flatscoped.items():
if config_identifiers not in ret:
ret[config_identifiers] = {}
ret[config_identifiers].update({("past_nicks",): v2data})
return ret
def customcom_conv_spec(self, data: dict):
flatscoped = self.apply_scope(Config.GUILD, self.flatten_dict(data))
ret = {}
for k, v in flatscoped.items():
outerkey, innerkey = (*k[:-1],), ("commands", k[-1])
if outerkey not in ret:
ret[outerkey] = {}
ccinfo = {
"author": {"id": 42, "name": "Converted from a v2 instance"},
"command": k[-1],
"created_at": "{:%d/%m/%Y %H:%M:%S}".format(datetime.utcnow()),
"editors": [],
"response": v,
}
ret[outerkey].update({innerkey: ccinfo})
return ret
def get_config_object(self, bot, cogname, attr, _id):
try:
config = getattr(bot.get_cog(cogname), attr)
except (TypeError, AttributeError):
config = Config.get_conf(None, _id, cog_name=cogname)
return config
def get_conversion_info(self, prettyname: str):
info = self.available_core_conversions[prettyname]
filepath, converter = info["file"], info["converter"]
(cogname, attr, _id) = info["cfg"]
return filepath, converter, cogname, attr, _id
async def convert(self, bot: Red, prettyname: str, config=None):
if prettyname not in self.available:
raise NotImplementedError("No Conversion Specs for this")
filepath, converter, cogname, attr, _id = self.get_conversion_info(prettyname)
if config is None:
config = self.get_config_object(bot, cogname, attr, _id)
try:
items = converter(dc.json_load(filepath))
await dc(config).dict_import(items)
except Exception:
raise
else:
self.resolved.add(prettyname)

View File

@@ -1,73 +0,0 @@
from pathlib import Path
import asyncio
from redbot.core import checks, commands
from redbot.core.bot import Red
from redbot.core.i18n import Translator, cog_i18n
from redbot.cogs.dataconverter.core_specs import SpecResolver
from redbot.core.utils.chat_formatting import box
from redbot.core.utils.predicates import MessagePredicate
_ = Translator("DataConverter", __file__)
@cog_i18n(_)
class DataConverter(commands.Cog):
"""Import Red V2 data to your V3 instance."""
def __init__(self, bot: Red):
super().__init__()
self.bot = bot
@checks.is_owner()
@commands.command(name="convertdata")
async def dataconversioncommand(self, ctx: commands.Context, v2path: str):
"""Interactive prompt for importing data from Red V2.
Takes the path where the V2 install is, and overwrites
values which have entries in both V2 and v3; use with caution.
"""
resolver = SpecResolver(Path(v2path.strip()))
if not resolver.available:
return await ctx.send(
_(
"There don't seem to be any data files I know how to "
"handle here. Are you sure you gave me the base "
"installation path?"
)
)
while resolver.available:
menu = _("Please select a set of data to import by number, or 'exit' to exit")
for index, entry in enumerate(resolver.available, 1):
menu += "\n{}. {}".format(index, entry)
menu_message = await ctx.send(box(menu))
try:
message = await self.bot.wait_for(
"message", check=MessagePredicate.same_context(ctx), timeout=60
)
except asyncio.TimeoutError:
return await ctx.send(_("Try this again when you are ready."))
else:
if message.content.strip().lower() in ["quit", "exit", "-1", "q", "cancel"]:
return await ctx.tick()
try:
message = int(message.content.strip())
to_conv = resolver.available[message - 1]
except (ValueError, IndexError):
await ctx.send(_("That wasn't a valid choice."))
continue
else:
async with ctx.typing():
await resolver.convert(self.bot, to_conv)
await ctx.send(_("{} converted.").format(to_conv))
await menu_message.delete()
else:
return await ctx.send(
_(
"There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
)
)

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:06\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ar\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: ar_SA\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:06\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Bulgarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: bg\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: bg_BG\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: da\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: da_DK\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,60 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: de\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: de_DE\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr "Importiere Red V2 Daten in deine V3 Instanz."
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr "Interaktive Eingabeaufforderung um Daten aus Red V2 zu importieren.\n\n"
" Nimmt den Pfad der V2 Installation und überschreibt\n"
" Werte die Einträge in V2 und V3 haben; vorsichtig benutzen.\n"
" "
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "Es scheint keine Dateien zu geben, die ich nutzen kann. Bist du sicher, dass du dem Basis-Installationspfad gefolgt bist?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "Wähle einen Datensatz zum importieren per Nummer oder `exit` zum beenden"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr "Versuche dies erneut wenn du bereit bist."
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr "Das war keine valide Auswahl."
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr "{} konvertiert."
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr "Es gibt nichts mehr, was ich konvertieren könnte.\n"
"Es könnte in Zukunft mehr geben, was ich konvertieren kann."

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: el\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: el_GR\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Pirate English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: en-PT\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: en_PT\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,57 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:06\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: es-ES\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: es_ES\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "No parece que haya aquí ningún archivo de datos que yo sepa manejar. ¿Estás seguro que me has dado la ruta de instalación base?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "Por favor seleccione un conjunto de datos para importar por número, o 'salir' para salir"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr "Esa no era una opción válida."
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr "{} convertido."
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr "Aquí no hay nada mas que yo sepa como convertir.\n"
"Aquí podrá haber cosas que yo pueda convertir en el futuro."

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Finnish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: fi\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: fi_FI\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,57 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:06\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: fr\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: fr_FR\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr "Importe des données venant de la V2 de Red vers votre instance Red V3."
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "Il ne semble pas y avoir de fichiers de données que je puisse gérer ici. Êtes-vous sûr de m'avoir donné le chemin d'installation de base?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "Veuillez sélectionner un ensemble de données à importer par numéro ou \"exit\" pour quitter"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr "Essayez à nouveau quand vous êtes prêt."
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr "Ce nétait pas un choix valide."
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr "{} converti."
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr "Il n'y a rien d'autre que je puisse convertir ici.\n"
"Il pourrait y avoir beaucoup plus de choses que je puisse convertir à l'avenir."

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: hu\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: hu_HU\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Indonesian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: id\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: id_ID\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: it\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: it_IT\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ja\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: ja_JP\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Korean\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ko\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: ko_KR\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "제가 처리해야 하는 데이터 파일이 없는 것 같습니다. 기본 설치 경로를 저에게 준 것이 확실한가요?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "중요한 데이터를 설정합니다. (오직 숫자만 입력 가능합니다. 또는 'exit' 를 입력하여 종료하실 수 있습니다)"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: LOLCAT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: lol\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: lol_US\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,60 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: nl\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: nl_NL\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr "Importeer de data van V2 naar je V3 instantie."
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr "Interactieve prompt voor het importeren van gegevens van Red V2.\n\n"
" Neemt het pad waar de V2-installatie zich bevindt en overschrijft\n"
" waarden met vermeldingen in zowel V2 als v3; voorzichtig gebruiken.\n"
" "
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "Er lijken geen gegevensbestanden te zijn die ik hier weet aan te wijzen. Weet je zeker dat je me het basisinstallatiepad hebt gegeven?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "Selecteer een set gegevens om te importeren op nummer of typ 'exit' om af te sluiten"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr "Probeer dit opnieuw als je klaar bent."
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr "Dat was geen geldige keuze."
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr "{} geconverteerd."
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr "Er is niets anders dat ik hier weet te converteren.\n"
"Er kunnen in de toekomst meer dingen zijn die ik kan omzetten."

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Norwegian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: no\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: no_NO\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pl\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: pl_PL\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Portuguese, Brazilian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pt-BR\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: pt_BR\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pt-PT\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: pt_PT\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,61 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 05:52\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ru\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: ru_RU\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr "Импортировать данные Red V2 в вашу сборку V3."
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr "Интерактивная подсказка для импорта данных из Red V2.\n\n"
" Принимает путь, по которому устанавливается V2, и\n"
" перезаписывает значения, которые имеют записи как в V2,\n"
" так и в v3; используйте с осторожностью.\n"
" "
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr "Кажется, здесь нет файлов данных, с которыми я знаю как обращаться. Вы уверены, что дали мне путь базовой установки?"
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr "Пожалуйста, выберите набор данных для импорта по номеру, или 'exit', чтобы выйти"
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr "Повторите попытку, когда вы будете готовы."
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr "Это был неправильный выбор."
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr "{} преобразован."
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr "Нет ничего, что я знаю, как конвертировать здесь.\n"
"Возможно, в будущем я смогу конвертировать еще больше вещей."

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:07\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Slovak\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: sk\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: sk_SK\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Swedish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: sv-SE\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: sv_SE\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Turkish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: tr\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: tr_TR\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,56 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-01-11 02:18+0000\n"
"PO-Revision-Date: 2019-02-25 03:08\n"
"Last-Translator: Kowlin <boxedpp@gmail.com>\n"
"Language-Team: Chinese Simplified\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 2.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: zh-CN\n"
"X-Crowdin-File: /cogs/dataconverter/locales/messages.pot\n"
"Language: zh_CN\n"
#: redbot/cogs/dataconverter/dataconverter.py:16
#, docstring
msgid "Import Red V2 data to your V3 instance."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:25
#, docstring
msgid "Interactive prompt for importing data from Red V2.\n\n"
" Takes the path where the V2 install is, and overwrites\n"
" values which have entries in both V2 and v3; use with caution.\n"
" "
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:34
msgid "There don't seem to be any data files I know how to handle here. Are you sure you gave me the base installation path?"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:41
msgid "Please select a set of data to import by number, or 'exit' to exit"
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:52
msgid "Try this again when you are ready."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:60
msgid "That wasn't a valid choice."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:65
msgid "{} converted."
msgstr ""
#: redbot/cogs/dataconverter/dataconverter.py:69
msgid "There isn't anything else I know how to convert here.\n"
"There might be more things I can convert in the future."
msgstr ""

View File

@@ -1,126 +0,0 @@
import json
from pathlib import Path
from redbot.core import Config
class DataConverter:
"""
Class for moving v2 data to v3
"""
def __init__(self, config_instance: Config):
self.config = config_instance
@staticmethod
def json_load(file_path: Path):
"""Utility function for quickly grabbing data from a JSON file
Parameters
----------
file_path: `pathlib.Path`
The path to the file to grabdata from
Raises
------
FileNotFoundError
The file doesn't exist
json.JsonDecodeError
The file isn't valid JSON
"""
try:
with file_path.open(mode="r", encoding="utf-8") as f:
data = json.load(f)
except (FileNotFoundError, json.JSONDecodeError):
raise
else:
return data
async def convert(self, file_path: Path, conversion_spec: object):
"""Converts v2 data to v3 format. If your v2 data uses multiple files
you will need to call this for each file.
Parameters
----------
file_path : `pathlib.Path`
This should be the path to a JSON settings file from v2
conversion_spec : `object`
This should be a function which takes a single argument argument
(the loaded JSON) and from it either
returns or yields one or more `dict`
whose items are in the form::
{(SCOPE, *IDENTIFIERS): {(key_tuple): value}}
an example of a possible entry of that dict::
{(Config.MEMBER, '133049272517001216', '78631113035100160'):
{('balance',): 9001}}
This allows for any amount of entries at each level
in each of the nested dictionaries returned by conversion_spec
but the nesting cannot be different to this and still get the
expected results
see documentation for Config for more details on scopes
and the identifiers they need
Returns
-------
None
Raises
------
FileNotFoundError
No such file at the specified path
json.JSONDecodeError
File is not valid JSON
AttributeError
Something goes wrong with your conversion and it provides
data in the wrong format
"""
v2data = self.json_load(file_path)
for entryset in conversion_spec(v2data):
for scope_id, values in entryset.items():
base = self.config._get_base_group(*scope_id)
for inner_k, inner_v in values.items():
await base.set_raw(*inner_k, value=inner_v)
async def dict_import(self, entrydict: dict):
"""This imports a dictionary in the correct format into Config
Parameters
----------
entrydict : `dict`
This should be a dictionary of values to set.
This is provided as an alternative
to providing a file and conversion specification
the dictionary should be in the following format::
{(SCOPE, *IDENTIFIERS): {(key_tuple): value}}`
an example of a possible entry of that dict::
{(Config.MEMBER, '133049272517001216', '78631113035100160'):
{('balance',): 9001}}
This allows for any amount of entries at each level
in each of the nested dictionaries returned by conversion_spec
but the nesting cannot be different to this and still get the
expected results
Returns
-------
None
Raises
------
AttributeError
Data not in the correct format.
"""
for scope_id, values in entrydict.items():
base = self.config._get_base_group(*scope_id)
for inner_k, inner_v in values.items():
await base.set_raw(*inner_k, value=inner_v)

View File

@@ -1,12 +0,0 @@
from pathlib import Path
from redbot.cogs.dataconverter import core_specs
__all__ = ["get_specresolver"]
def get_specresolver(path):
here = Path(path)
resolver = core_specs.SpecResolver(here.parent)
return resolver