我需要在新网站中使用名为Trajan的字体,无论如何都要安全地使用它而不使用Typekit?
我有一个使用Flask Babel来翻译模板的webapp.此webapp可以通过将数据库名称添加到其URL来使用多个数据库,如:
myapp.com/<dbname>
Run Code Online (Sandbox Code Playgroud)
问题是翻译路径在babel中是硬编码的:
def list_translations(self):
"""Returns a list of all the locales translations exist for. The
list returned will be filled with actual locale objects and not just
strings.
.. versionadded:: 0.6
"""
dirname = os.path.join(self.app.root_path, 'translations')
if not os.path.isdir(dirname):
return []
result = []
for folder in os.listdir(dirname):
locale_dir = os.path.join(dirname, folder, 'LC_MESSAGES')
if not os.path.isdir(locale_dir):
continue
if filter(lambda x: x.endswith('.mo'), os.listdir(locale_dir)):
result.append(Locale.parse(folder))
if not result:
result.append(Locale.parse(self._default_locale))
return result
Run Code Online (Sandbox Code Playgroud)
而babel迫使我进入名为"translations"的目录和名为"messages.mo"的语言文件
我试过整个互联网,但仍然没有明确的解决方案来解决这个问题.
我想到的一个想法是,有可能用babelex改变babel然后我可以覆盖翻译路径吗?
我正在使用上面描述的两个库,一个用于某些类型<ul>
的编写器效果,另一个用于脚本以匹配浮动<div>
高度.
当我链接jQuery 1.2.3时,打字机停止并显示所有<ul>
内容?你觉得我能做什么?
参考: