用于输入文本标记的合并友好格式是什么

发布于 2024-09-09 23:32:33 字数 587 浏览 4 评论 0原文

我有一个 Excel 列表(Excel 2003),用户在其中输入标记的翻译。它有 3 列 (键、值、语言)。它可以是类似键:Login.Header,值:“请登录网站”语言:en。

这非常有效。我使用此文件在使用大量图形作为文本的网站中生成特定于语言的图像。好处是用户无需安装新软件即可输入文本,编辑效果很好,并且我的 python 脚本可以轻松读取生成的文件。

有一个我不喜欢的地方:如果两个用户编辑文件并进行大量更改,那么合并将成为一场噩梦。

是否有一种编辑解决方案在我所描述的领域中与 excel 一样好,但可以更轻松地合并?

编辑

到目前为止的答案解释了源代码控制系统如何在这种情况下提供帮助。但我已经安装了 SVN。

问题是关于文件格式。有些文件格式很容易与 winmerge 等客户端合并(例如 java 或 c# 后端类的源代码),而其他文件格式则难以合并(xml、代码生成生成的文件)。 xls - excel 2003 的文件可以进行比较,但它仍然不是适合合并的好格式。

我认为有一个不同的应用程序(例如苹果作品,开放办公室,excel 2010 ..)可以让我编辑表格,但可以更轻松地合并。

I have an excel list (excel 2003) where user enter translations for tokens. It has 3 columns
(key, value, language). It can be something like key: Login.Header, value: "Please login to the website" language: en.

This works quite well. I use this file to generate language specific images in a website that uses lots of graphics for texts. The good thing is that users are able to enter text without installing new software, editing is nice and the resulting file can be read easily by my python script.

There is one think that I dislike: If 2 users edit the file and have lots of changes than merging gets a nightmare.

Is there an editing solution that is as good as excel in the areas I described but can be merged more easily?

EDIT

The answers so far explained how a source controll system can help in such a situation. But I already have SVN in place.

The question is about the file format. There are file formats that are easy to merge with a client like winmerge (like source code for java or c# backend classes) and there are others that are difficult to merge (xml, files generated by code generation). xls - files of excel 2003 can be diffed but it's still no nice format for merging.

I think there is a different application (something like apple works,open office, excel 2010 .. ) that let me edit a table but can be merged more easily.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

临走之时 2024-09-16 23:32:33

是否有一种编辑解决方案在我所描述的领域与 Excel 一样好,但可以更轻松地合并?

也许不完全是预期的答案,但避免合并和冲突问题的最佳方法显然是避免必须合并。我会考虑使用协作编辑解决方案来避免处理文件的各种版本:

  • 如果您的所有用户都在同一网络(LAN、VPN)上,那么首先想到的解决方案是网络共享上的唯一 Excel 文件并激活共享工作簿 选项。这工作得很好,如果发生冲突,系统会提示用户一个冲突解决对话框。

  • 如果这不是一个选项,那么您可以将电子表格放在 Google 文档上。 Google 文档非常适合协作工作(可以轻松配置谁可以访问文档,您可以查看当前连接的用户列表,协作版本即可正常工作)。然后,完成后导出电子表格进行处理。

  • 使用协作文本编辑器,如 Gobby(多平台)并处理原始 CSV 文件。但这对于用户来说不是很友好,特别是对于非技术人员,并且容易出错。我喜欢上述解决方案。

Is there an editing solution that is as good as excel in the areas I described but can be merged more easily?

Maybe not exactly the expected answer but the best way to avoid merge and conflicts problems would be obviously to avoid having to merge. I would consider using a collaborative editing solution to avoid having to deal with various versions of the file:

  • If all your users are on a same network (LAN, VPN), then the first solution that come to mind would be to put a unique Excel file on a network share and to activate the Shared Workbook option. This works pretty well and, in case of conflict, users are prompted with a conflict resolution dialog box.

  • If this is not an option, then you could maybe put your spreadsheet on Google Docs. Google Docs works very well for collaborative work (it's easy to configure who can access a document, you can see a list of users currently connected, the collaborative edition just works). Then just export the spreadsheet for processing when done.

  • Use a collaborative text editor like Gobby (multi platform) and work on a raw CSV file. This won't be very user friendly though, especially for non techies, and error prone. I'd favor the above solutions.

骷髅 2024-09-16 23:32:33

一种方法是将此 Excel 文件导出为 XML 或 CSV。比使用Excel编辑文本类型文件而不是默认的xls二进制格式。

还可以考虑将一个大文件拆分为多个文件。这减少了两个人想要处理同一个文件的机会。

将其置于源代码控制之下并向您的用户介绍源代码控制的基础知识。让用户负责合并文件。 SVN 对于这项任务来说非常明智,因为它是一个集中式的解决方案,而不是一个非常复杂的解决方案。为普通用户使用一个漂亮的GUI

有了集中源代码控制,您就可以引入锁定。它允许您在一个用户打开文件后拒绝写入访问,以便只有一个用户可以同时编辑文件。

One approach would be to export this Excel file as XML or CSV. Than use Excel to edit text-type file instead of default binary format of xls.

Also consider splitting the one big file into several files. This reduces the chances that two people want to work on the same file.

Put it under source control and introduce your users to basics of source control. Let uses will be responsible for merging files. SVN will be quite sensible for the task since it is a centralized and not a very complicated solution. Use a nice GUI for ordinary users.

With a centralized source control in place you may introduce locking. It allows you to deny write access once one user opens the file, so that only one user can edit a file at the same time.

一梦等七年七年为一梦 2024-09-16 23:32:33

合并常常是一种痛苦。某些版本控制系统可以为您完成大部分跑腿工作,合并不冲突的更改,并在两者都尝试更改相同令牌时提示用户。

Tortoise(SVN 或 Hg)具有合并功能,可以轻松实现此操作。但我是作为一名开发人员来说的 - 我在向非开发人员引入版本控制方面遇到了很大的困难,即使是那些不使用 CD 托盘作为杯架的有能力的开发人员。 :)

您可能会考虑将一个大文件拆分为多个文件。这减少了两个人想要处理同一个文件的机会。一旦一个用户打开文件,还可能拒绝写入访问,因此只有一个用户可以同时编辑文件。

Merging is often a pain. Some version control systems can do most of the legwork for you, merging non-conflicting changes and prompting the user when both attempt to change the same token.

Tortoise (SVN or Hg) have merge functionality that makes this painless. But I'm speaking as a developer - I've had quite a lot of difficulty introducing version control to non-developers, even the competent ones that don't use their CD tray as a cup holder. :)

You might consider splitting the one big file into several files. This reduces the chances that two people want to work on the same file. There is also the possibility of denying write access once one user opens the file, so that only one user can edit a file at the same time.

栖竹 2024-09-16 23:32:33

Excel 的一个鲜为人知/使用的功能是“共享工作簿”功能。您可以在工具->共享工作簿下找到它。只需单击“允许更改...”复选框,您就可以在“高级”选项卡中进行微调。

对于让多个用户对工作表应用编辑的最佳选择,这绝对是最佳选择,并且适用于两种情况:

  1. 每个人都下载 XLS 的副本并在自己这边进行编辑,然后上传回某个位置。然后您可以将其与原始文件合并。
  2. 每个人都打开 XLS 的同一副本并同时进行编辑。然后您可以合并任何/所有更改。

A little known/used feature of Excel is the "Shared Workbook" functionality. You can find it under Tools -> Share Workbook. Just click to the "Allow changes..." check box and you can fine tune in the "Advanced" tab.

This is bar-none the best option for having multiple users apply edits to a worksheet and works in two scenarios:

  1. Everyone downloads a copy of the XLS and edits on their side and uploads back to some location. You can then take this and merge it back with the original.
  2. Everyone opens the same copy of the XLS and makes edits at the same time. You can then merge any/all changes.
她说她爱他 2024-09-16 23:32:33

让用户像现在一样使用 Excel 文件,但将数据保存在版本控制下的纯文本文件(可能是 csv)中。那么您只需要:

  • 一个小的 Python 脚本,用于将文本文件转换为 Excel 以提供给用户。

  • 一个小的 Python 脚本,用于将完成的 Excel 文件转换回文本。这需要对数据进行一致的排序(例如,在键和语言上)以简化合并。

Let the users use an Excel file as now, but keep the data in a plain text file (csv, probably) under version control. Then you just need:

  • One small python script to convert the text file to Excel to give to the user.

  • One small python script to convert the completed Excel file back into text. This needs to sort the data consistently (on the key and the language, say) to simplify merges.

长不大的小祸害 2024-09-16 23:32:33

任何类型的平面文件都很容易合并。

如果您想坚持使用 Excel,那么编写一个将单元格内容导出到平面文件中的宏并不难。为了可用性,您可以使宏还以本机 Excel 格式保存工作表以供将来编辑。如果您在工作表上放置一个按钮并将其链接到宏,则用户只需单击该按钮即可轻松导出并保存文件。

Any type of flat file would be pretty easy to merge.

If you wanted to stick with Excel, it wouldn't be hard to write a macro that would export the contents of the cells into the flat file. For usability, you could make the macro also save the sheet in native Excel format for future editing. If you placed a button on the sheet and linked it the macro, the user could export and save the file in one easy step by clicking the button.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文