#
msgid ""
msgstr ""
"Project-Id-Version: Modelica by Example 0.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-14 10:14-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dongping Xie <dongping.xie.tud@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../../source/components/packages/importing.rst:4
msgid "Importing"
msgstr "导入"

#: ../../source/components/packages/importing.rst:8
msgid ""
"As we saw previously, there are basically three forms of importing. In all "
"cases, the ``import`` statement creates an \"alias\" within the definition "
"that refers to a type defined elsewhere."
msgstr "正如我们前面所看到的，导入基本上有三种形式。\ "
"在所有情况下，\ ``import``\ 语句创建了一个“别名”去引用模型外定义的类型。\ "

#: ../../source/components/packages/importing.rst:12
msgid ""
"The first form simply imports a definition by its fully qualified name, "
"e.g.:"
msgstr "第一种形式采用类型的全限定名引入定义，例如："

#: ../../source/components/packages/importing.rst:19
msgid ""
"The result of such an import is that references to the name ``Temperature`` "
"are mapped to the fully qualified name ``Modelica.SIunits.Temperature``.  In"
" other words, the alias introduced by the ``import`` statement is "
"``Temperature`` and it maps to the definition found at "
"``Modelica.SIunits.Temperature``.  With this form of import, the name of the"
" alias always matches the last element in the name of what is being imported"
" (*e.g.,* ``Temperature``)."
msgstr ""
"导入的结果是，对名称\ ``Temperature``\ 的引用会映射到全限定名\ "
"``Modelica.SIunits.Temperature``\ 处。\ "
"换言之，由\ ``import``\ 声明引入别名\ ``Temperature``\ ，\ "
"并将其映射到在\ ``Modelica.SIunits.Temperature``\ 出现的定义。\ "
"这种形式的导入会让别名总与被导入名称的最后一个元素相同。\ "

#: ../../source/components/packages/importing.rst:28
msgid ""
"In some cases, we want the alias that is introduced to be different from the"
" last element of the imported name.  In this case, we can explicitly "
"introduce an alternative name for the alias, *e.g.,*"
msgstr "在某些情况下，我们希望别名与被导入名称的最后一个元素不同。\ "
"这种情况下，我们可以明确地引入一个替代名称。\ "
"例如："

#: ../../source/components/packages/importing.rst:36
msgid ""
"After such an import, we can use the alias ``DegK`` to refer to "
"``Modelica.SIunits.Temperature``.  Providing alternative names avoids name "
"collisions or simply makes the model more readable."
msgstr ""
"在上述的导入后，我们就可以使用别名\ ``DegK``\ 指代\ ``Modelica.SIunits.Temperature``\ 。\ "
"提供替代名称可避免命名冲突，或者只是为了让模型更具可读性。\ "

#: ../../source/components/packages/importing.rst:40
msgid ""
"Finally, it is possible to import all definitions within a package into the "
"current scope.  This is done with a wildcard import.  For example, to import"
" all the definitions in the ``Modelica.SIunits`` package, we would use the "
"following ``import`` statement:"
msgstr ""
"最后，也可以在一个包中导入所有定义到当前作用域。\ "
"这可以通过通配符导入实现。\ "
"例如，要导入\ ``Modelica.SIunits``\ "
"包内的所有定义，我们可以使用下面的\ ``import``\ 语句："

#: ../../source/components/packages/importing.rst:49
msgid ""
"Such an import would create as many aliases as there are definitions in "
"``Modelica.SIunits``.  The only option available is for each alias to be "
"named the same as the definition in the imported package (*i.e.,* it isn't "
"possible to assign an alternative name for the alias)."
msgstr ""
"上述导入会创建和\ ``Modelica.SIunits``\ 内总定义数目相等的别名。\ "
"别名名称的唯一可能性就是和所导入包内定义的原名相同（即不可能为别名分配替代名称）。\ "

#: ../../source/components/packages/importing.rst:0
msgid "Wildcards considered harmful"
msgstr "通配符有害"

#: ../../source/components/packages/importing.rst:59
msgid ""
"These types of wildcard imports are dangerous because, as mentioned, there "
"is no option to rename a type.  As a consequence, two or more wildcard "
"imports in the same model could create name clashes.  Furthermore, explicit "
"imports (or fully qualified types) make it very easy to backtrack and locate"
" the definition associated with a given type.  Wildcards make this very "
"difficult because it is not clear what types are imported from what "
"packages."
msgstr ""
"这种通配符导入很危险。\ "
"其原因如上所述。\ "
"用户不能对类型进行重命名。\ "
"这样的结果是，在一个模型内进行两次或多次通配符导入可能产生命名冲突。\ "
"再者，明确的导入（或直接使用全限定的类型）使得对于类型所关联定义的回溯与定位变得更为容易。\ "
"而使用通配符则使这变得非常困难。\ "
"原因是使用通配符后，导入类型和所在包的关系便不再清晰。\ "

#: ../../source/components/packages/importing.rst:69
msgid ""
"If you want to import multiple entries from the same package you can use a "
"special syntax."
msgstr ""
"如果你想从同一个包导入多项，你可以使用一种特殊的语法。"


#: ../../source/components/packages/importing.rst:75
msgid ""
"This avoids the repetition of multiple imports while avoiding the problems "
"of wildcards. Note that this feature was introduced in Modelica Language "
"Specification Version 3.3."
msgstr ""
"这就避免了多条导入语句，同时也避免了通配符导入语句所带来的问题。\ "
"注意，此特性是在Modelica的语言规范3.3版才引入了。"
