重新排序.strings文件

时间:2014-11-28 10:01:49

标签: ios iphone bash ipad localization

在我的Localizable.Strings中,我尝试按字母顺序排列所有对。是否可以按字母顺序对我的Localizable.strings文件进行重新排序,不区分大小写? Maby使用genstring或特殊的bash脚本?

例如我有字符串:

"app" = "app";
"Application settings" = "Application settings";
"back" = "back";
"Back" = "Back";
"Average rating" = "Average rating";

我想收到:

"Average rating" = "Average rating";
"app" = "app";
"Application settings" = "Application settings";
"back" = "back";
"Back" = "Back";

1 个答案:

答案 0 :(得分:5)

您可以使用忽略案例sort

sort -f Localizable.strings
"app" = "app";
"Application settings" = "Application settings";
"Average rating" = "Average rating";
"Back" = "Back";
"back" = "back";