Sandcastle 的问题:本地化和文件名大小写
我正在使用 Sandcastle Help File Builder 来构建开源项目的文档,但我面临两个问题:
文档内容是法语。我在 SHFB 项目中将语言设置为法语,但大多数生成的文本仍然是英语(“属性”、“继承层次结构”、“另请参阅”...)。我看到 SharedContent 文件夹中有一些本地化文件(实际上没有完全本地化),但它们只允许翻译一些内容,主要是细节(反馈、免责声明、隐私声明等)。 如何本地化其余文本?请注意,我有英文版的 Visual Studio 2008;这会是一个问题吗?
文档以 HTML 形式生成,并将托管在 Linux/Apache 服务器上。不幸的是,Sandcastle 生成的许多文件名大小写不一致,因此它无法在 Linux 服务器上运行。例如,“Index.html”不被 Apache 视为默认文档(它应该是“index.html”),并且由于大小写错误而找不到 CSS 文件...我可以手动修复大小写,但我每次我重建文档时都必须再次执行此操作。 该问题有已知的解决方案吗?我想我不是第一个在 Linux 服务器上托管 Sandcastle 生成的文档的人,但我找不到任何有关该问题的有用信息...
感谢您的帮助
I'm using Sandcastle Help File Builder to build the documentation for an open source project, and I'm facing two issues :
The documentation content is in French. I set the language to French in the SHFB project, but most of the generated text is still in English ("Properties", "Inheritance Hierarchy", "See also"...). I saw that there are a few localized files in the SharedContent folders (which are actually not fully localized), but they allow to translate only a few things, mostly details (feedback, disclaimer, privacy statement and such). How can I localize the rest of the text ? Note that I have an English version of Visual Studio 2008 ; could that be an issue ?
The documentation is generated as HTML and will be hosted on an Linux/Apache server. Unfortunately many filenames generated by Sandcastle have inconsistent casing, so it doesn't work on a Linux server. For instance "Index.html" is not considered the default document by Apache (it should be "index.html"), and the CSS files are not found because of the wrong casing... I could fix the casing manually, but I would have to do it again every time I rebuild the documentation. Is there a known solution to that issue ? I guess I'm not the first one to host documentation generated by Sandcastle on a Linux server, but I couldn't find any useful information about that...
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道第一个问题。
在第二个问题上,我遇到了类似的情况。我构建了一个工具来将 .chm 文件解压成组成文件,然后调整它们,添加预告片等。您可以做类似的事情,而不是编辑它们,而是重命名它们。
为了解压,我使用了本文中的代码。
但后来我发现SHFB可以直接生成.html文件,所以这个解压步骤可能是不必要的。 (我不知道,我从来没有回去配置 SHFB 来生成 html 文件)
一旦您解压了 HTML 文件,或者直接从 SHFB 生成了它们,您甚至可以在脚本中批量重命名它 - 例如 powershell 或 javascript /cscript.exe。
I don't know about the first question.
On the 2nd issue, I faced something similar. I built a tool to unpack the .chm file into constituent files, and then twiddle them, adding trailers, etc. You could do something similar and rather than editing them, rename them.
To unpack I used the code from this article.
But then I found out that SHFB could product .html files directly, so this unpack step may have been unnecessary. (I don't know, I never went back and configured SHFB to produce html files)
Once you have unpacked the HTML files, or produced them directly from SHFB, you could even do the batch renaming it in a script - like powershell or javascript/cscript.exe.
我想我找到了语言问题的解决方案:
更新 Sandcastle 创建的文档语言
现在我只需翻译所有参考文本;)
关于第二个问题,实际上只有2个文件需要重命名(Index.html和styles/Presentation.css需要重命名为小写),所以还不错......
I think I found a solution to the language issue :
Update the language of documentation created by Sandcastle
Now I just have to translate all the reference texts ;)
Regarding the second issue, actually there are only 2 files that need to be renamed (Index.html and styles/Presentation.css need to be renamed to lowercase), so it's not so bad...