I'm still new at this, so I was looking for an example project. Astrid is open source on Github, and looking through the projects res directory was eye opening for a newbie like me.
helpMessageHeading;
purpose: help; context: a Message (abstract, could be a dialog), context_of_dialog: Heading; (the heading of a help dialog)
helpMessageText;
purpose: help, context: a Message (abstract, could be a dialog), context_of_dialog: Text; (the text inside a help dialog)
helpExplanation;
purpose: help; context_of_help: Explanation (just a explanation of the help topic)
Nice question. Im struggling with this too. My naming scheme is:
1) UI elements: If a string only corresponds to a ui i name it accordingly to the control element and the purpose, as well as in which part of the control element it is used. example:
button_helpText;
control : button, purpose: help, context: Text;
2) General elements: If a string is used on the UI but i want to use it in another context i just leave the prefix and add a postfix to describe the purpose / context mor precise.
helpMessageHeading;
purpose: help; context: a Message (abstract, could be a dialog), context_of_dialog: Heading; (the heading of a help dialog)
helpMessageText;
purpose: help, context: a Message (abstract, could be a dialog), context_of_dialog: Text; (the text inside a help dialog)
helpExplanation;
purpose: help; context_of_help: Explanation (just a explanation of the help topic)
3) Ordering: I order those string mainly based on their context as it is what you normally search for.
and so on. So my list is normally seperated in UI controls and, if a string is not bound to it, its general precise context. Why do i use the precise context ? when you search for a string to describe what you do the most unique idea about this string is its precise context, so thats what should pop up first. But when you use auto-completion you normally search for the general description. i think this structure is a fine solution.
How to keep translations in sync? Are there collaborative online tools you can recommend?
At the moment I'm using this collaborative tool http://www.getlocalization.com/ which makes life a lot more easier and is free if using no pro features.
Then there is also https://crowdin.com/ which is a bit better in my opinion becuse ist proposes translations by google and bing but costs 9$ in the cheapest variant.
How to order the string in the strings.xml file? Alphabetical? Grouped by Activity? ...?
Up to now, I didn't order them because I mostly don't edit my xml by hand. There is a plugin which makes handling multiple translations in eclipse very easy: Sequoyah localization Editor
发布评论
评论(6)
我对此还是新手,所以我一直在寻找一个示例项目。 Astrid 在 Github 上是开源的,浏览项目 res 目录对于像我这样的新手来说是大开眼界。
好东西。看一下:
https://github.com/todoroo/astrid/tree/master/astrid/资源/值
I'm still new at this, so I was looking for an example project. Astrid is open source on Github, and looking through the projects res directory was eye opening for a newbie like me.
Good stuff. Take a look:
https://github.com/todoroo/astrid/tree/master/astrid/res/values
好问题。我也在为此苦苦挣扎。我的命名方案是:
1)UI元素:
如果一个字符串仅对应于一个 ui,我会根据控制元素和用途以及在控制元素的哪个部分使用它来命名它。示例:
2) 一般要素:
如果在 UI 上使用字符串,但我想在另一个上下文中使用它,我只需保留前缀并添加后缀来更精确地描述目的/上下文。
3)订购:
我主要根据它们的上下文来排序这些字符串,因为它是您通常搜索的内容。
等等。因此,我的列表通常在 UI 控件中分开,如果字符串未绑定到它,则它的一般精确上下文。为什么我要使用精确的上下文?当您搜索一个字符串来描述您所做的事情时,关于该字符串最独特的想法是它的精确上下文,因此这就是应该首先弹出的内容。但是,当您使用自动完成功能时,您通常会搜索一般描述。我认为这个结构是一个很好的解决方案。
我对其他答案很感兴趣。
Nice question. Im struggling with this too. My naming scheme is:
1) UI elements:
If a string only corresponds to a ui i name it accordingly to the control element and the purpose, as well as in which part of the control element it is used. example:
2) General elements:
If a string is used on the UI but i want to use it in another context i just leave the prefix and add a postfix to describe the purpose / context mor precise.
3) Ordering:
I order those string mainly based on their context as it is what you normally search for.
and so on. So my list is normally seperated in UI controls and, if a string is not bound to it, its general precise context. Why do i use the precise context ? when you search for a string to describe what you do the most unique idea about this string is its precise context, so thats what should pop up first. But when you use auto-completion you normally search for the general description. i think this structure is a fine solution.
I im very interested in other answers.
检查约定的最佳位置很可能是在 Android SDK 示例中。以下是找到它们的方法 -http://developer.android.com/tools/samples/索引.html
The best place to check out conventions would most likely be within the Android SDK samples. Here's how you can find them -http://developer.android.com/tools/samples/index.html
对我来说,最好的工具是 http://www.translatekarate.com
它是免费且协作的。
For me, the best tool is http://www.translatekarate.com
It is free and collaborative.
目前我正在使用这个协作工具 http://www.getlocalization.com/ 它让生活如果不使用专业功能,则更容易并且免费。
然后还有 https://crowdin.com/ ,它在我的观点是因为 ist 建议通过 google 和 bing 进行翻译,但最便宜的版本要花费 9 美元。
到目前为止,我还没有订购它们,因为我基本上不手动编辑 xml。
有一个插件可以让在 Eclipse 中处理多个翻译变得非常容易:Sequoyah 本地化编辑器
At the moment I'm using this collaborative tool http://www.getlocalization.com/ which makes life a lot more easier and is free if using no pro features.
Then there is also https://crowdin.com/ which is a bit better in my opinion becuse ist proposes translations by google and bing but costs 9$ in the cheapest variant.
Up to now, I didn't order them because I mostly don't edit my xml by hand.
There is a plugin which makes handling multiple translations in eclipse very easy: Sequoyah localization Editor
我使用项目管理工具 https://poeditor.com 来翻译 XML 文件并保持它们同步。
I use the project management tool https://poeditor.com to translate XML files and keep them in sync.