@@ -885,6 +885,19 @@ TimeFormat getPrimaryOrSecondaryTimeFormatForCommand() {
885
885
return TF_RULER;
886
886
}
887
887
888
+ int countNonEmptyTakes (MediaItem* item) {
889
+ if (!item)
890
+ return 0 ;
891
+ int totalTakes = CountTakes (item);
892
+ int nonEmptyTakes = 0 ;
893
+ for (int t = 0 ; t < totalTakes; ++t) {
894
+ if (GetTake (item, t)) {
895
+ nonEmptyTakes++;
896
+ }
897
+ }
898
+ return nonEmptyTakes;
899
+ }
900
+
888
901
// End of utility/helper functions
889
902
890
903
// Functions exported from SWS
@@ -1671,7 +1684,7 @@ void postSwitchToTake(int command) {
1671
1684
return ;
1672
1685
}
1673
1686
ostringstream s;
1674
- s << (int )(size_t )GetSetMediaItemTakeInfo (take, " IP_TAKENUMBER" , nullptr ) + 1 << " "
1687
+ s << (int )(size_t )GetSetMediaItemTakeInfo (take, " IP_TAKENUMBER" , nullptr ) + 1 << " , "
1675
1688
<< GetTakeName (take);
1676
1689
addTakeFxNames (take, s);
1677
1690
outputMessage (s);
@@ -3713,11 +3726,11 @@ void moveToItem(int direction, bool clearSelection=true, bool select=true) {
3713
3726
if (take) {
3714
3727
s << " " << GetTakeName (take);
3715
3728
}
3716
- int takeCount = CountTakes (item);
3717
- if (takeCount > 1 ) {
3718
- // Translators: Used when navigating items to indicate the number of
3719
- // takes. {} will be replaced with the number; e.g. "2 takes".
3720
- s << " " << format (translate (" {} takes" ), takeCount );
3729
+ int nonEmptyTakes = countNonEmptyTakes (item);
3730
+ if (nonEmptyTakes > 1 ) {
3731
+ // Translators: Used when navigating items to indicate the number of takes, only if there is more than 1 take.
3732
+ // {} will be replaced with the number of takes ; e.g. "2 takes".
3733
+ s << " " << format (translate (" {} takes" ), nonEmptyTakes );
3721
3734
}
3722
3735
s << " " << formatCursorPosition ();
3723
3736
addTakeFxNames (take, s);
@@ -4870,11 +4883,11 @@ void cmdReportNumberOfTakesInItem(Command* command) {
4870
4883
MediaItem* item = getItemWithFocus ();
4871
4884
if (!item)
4872
4885
return ;
4873
- int takeCount = CountTakes (item);
4886
+ int nonEmptyTakes = countNonEmptyTakes (item);
4874
4887
// Translators: Reports the number of takes contained within the last touched item.
4875
4888
// {} will be replaced with the number; e.g. "1 take", or "2 takes".
4876
- outputMessage (format (translate_plural (" {} take" , " {} takes" , takeCount ),
4877
- takeCount ));
4889
+ outputMessage (format (translate_plural (" {} take" , " {} takes" , nonEmptyTakes ),
4890
+ nonEmptyTakes ));
4878
4891
}
4879
4892
4880
4893
void cmdReportItemLength (Command* command) {
0 commit comments